Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7982178b authored by Pirama Arumuga Nainar's avatar Pirama Arumuga Nainar
Browse files

Update cflags for building Windows modules with Clang

Bug: http://b/69933068

- Add -Wexit-time-destructor globally after fixing one warning
- Enable -Wthread-safety only for non-windows targets.  The version of
libstdc++ we use for Windows doesn't have the correct thread-safety
annotations.

Test: Run Clang-built adb_test.exe under wine
Change-Id: I76a43060342e7d1dc370ce3e117f3563c82b7751
parent 08839ff9
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -19,17 +19,13 @@ cc_defaults {
        "-Wall",
        "-Wextra",
        "-Werror",
        "-Wexit-time-destructors",
        "-Wno-unused-parameter",
        "-Wno-missing-field-initializers",
        "-Wvla",
    ],
    rtti: true,

    clang_cflags: [
        "-Wexit-time-destructors",
        "-Wthread-safety",
    ],

    use_version_lib: true,

    compile_multilib: "first",
@@ -85,6 +81,12 @@ cc_defaults {
                "-luserenv",
            ],
        },

        not_windows: {
            cflags: [
                "-Wthread-safety",
            ],
        },
    },
}