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
This commit is contained in:
Pirama Arumuga Nainar 2018-06-01 11:31:38 -07:00
parent 08839ff904
commit 7982178b7b

View file

@ -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",
],
},
},
}