Merge "Use -Werror in external/compiler-rt"
diff --git a/lib/asan/Android.bp b/lib/asan/Android.bp
index d453d63..520985c 100644
--- a/lib/asan/Android.bp
+++ b/lib/asan/Android.bp
@@ -51,6 +51,8 @@
"-DASAN_NEEDS_SEGV=" + ASAN_NEEDS_SEGV,
"-DASAN_HAS_EXCEPTIONS=" + ASAN_HAS_EXCEPTIONS,
"-DASAN_FLEXIBLE_MAPPING_AND_OFFSET=" + ASAN_FLEXIBLE_MAPPING_AND_OFFSET,
+ "-Wall",
+ "-Werror",
"-Wno-covered-switch-default",
"-Wno-non-virtual-dtor",
"-Wno-sign-compare",
@@ -210,6 +212,7 @@
srcs: ["asanwrapper.cc"],
+ cflags: ["-Wall", "-Werror"],
cppflags: ["-std=c++11"],
sanitize: {
never: true,
@@ -233,6 +236,8 @@
"external/compiler-rt/lib/sanitizer_common/tests",
],
cflags: [
+ "-Wall",
+ "-Werror",
"-Wno-non-virtual-dtor",
"-Wno-unused-parameter",
"-Wno-sign-compare",
@@ -273,6 +278,8 @@
"-DASAN_NEEDS_SEGV=" + ASAN_NEEDS_SEGV,
"-DASAN_HAS_EXCEPTIONS=" + ASAN_HAS_EXCEPTIONS,
"-DASAN_HAS_BLACKLIST=1",
+ "-Wall",
+ "-Werror",
"-Wno-covered-switch-default",
"-Wno-non-virtual-dtor",
"-Wno-sign-compare",
diff --git a/lib/interception/Android.bp b/lib/interception/Android.bp
index 939bc24..edca9e6 100644
--- a/lib/interception/Android.bp
+++ b/lib/interception/Android.bp
@@ -21,12 +21,14 @@
sdk_version: "19",
include_dirs: ["external/compiler-rt/lib"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
cppflags: [
"-fvisibility=hidden",
"-fno-exceptions",
"-std=c++11",
- "-Wall",
- "-Werror",
"-Wno-unused-parameter",
],
srcs: [
diff --git a/lib/lsan/Android.bp b/lib/lsan/Android.bp
index 6fe75d4..80e43be 100644
--- a/lib/lsan/Android.bp
+++ b/lib/lsan/Android.bp
@@ -33,6 +33,8 @@
"-std=c++11",
"-fno-rtti",
"-fno-builtin",
+ "-Wall",
+ "-Werror",
],
srcs: [
"lsan_common.cc",
diff --git a/lib/sanitizer_common/Android.bp b/lib/sanitizer_common/Android.bp
index de8cf61..3783767 100644
--- a/lib/sanitizer_common/Android.bp
+++ b/lib/sanitizer_common/Android.bp
@@ -24,14 +24,16 @@
sdk_version: "19",
include_dirs: ["external/compiler-rt/lib"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
cppflags: [
"-fvisibility=hidden",
"-fno-exceptions",
"-fno-rtti",
"-fno-builtin",
"-std=c++11",
- "-Wall",
- "-Werror",
"-Wno-non-virtual-dtor",
"-Wno-unused-parameter",
],
diff --git a/lib/sanitizer_common/tests/Android.bp b/lib/sanitizer_common/tests/Android.bp
index 2dd3642..02d7daf 100644
--- a/lib/sanitizer_common/tests/Android.bp
+++ b/lib/sanitizer_common/tests/Android.bp
@@ -18,13 +18,15 @@
cc_defaults {
name: "san_test_defaults",
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
cppflags: [
"-fvisibility=hidden",
"-fno-exceptions",
"-fno-rtti",
"-std=c++11",
- "-Wall",
- "-Werror",
"-Wno-unused-parameter",
"-Wno-non-virtual-dtor",
],
diff --git a/lib/tsan/Android.bp b/lib/tsan/Android.bp
index 79de623..13eb7da 100644
--- a/lib/tsan/Android.bp
+++ b/lib/tsan/Android.bp
@@ -15,10 +15,13 @@
//
//
-tsan_rtl_cppflags = [
- "-std=c++11",
+tsan_rtl_cflags = [
"-Wall",
"-Werror",
+]
+
+tsan_rtl_cppflags = [
+ "-std=c++11",
"-Wno-unused-parameter",
"-Wno-non-virtual-dtor",
"-fno-rtti",
@@ -29,6 +32,7 @@
name: "libtsan",
include_dirs: ["external/compiler-rt/lib"],
+ cflags: tsan_rtl_cflags,
cppflags: tsan_rtl_cppflags,
srcs: [
"rtl/*.cc",
@@ -55,6 +59,7 @@
name: "libtsan_cxx",
include_dirs: ["external/compiler-rt/lib"],
+ cflags: tsan_rtl_cflags,
cppflags: tsan_rtl_cppflags,
srcs: ["rtl/tsan_new_delete.cc"],
stl: "none",
@@ -75,6 +80,7 @@
include_dirs: ["external/compiler-rt/lib"],
local_include_dirs: ["rtl"],
+ cflags: tsan_rtl_cflags,
cppflags: tsan_rtl_cppflags,
srcs: [
"tests/unit/tsan_clock_test.cc",
@@ -109,6 +115,7 @@
include_dirs: ["external/compiler-rt/lib"],
local_include_dirs: ["rtl"],
+ cflags: tsan_rtl_cflags,
cppflags: tsan_rtl_cppflags,
srcs: [
"tests/rtl/tsan_bench.cc",
diff --git a/lib/ubsan/Android.bp b/lib/ubsan/Android.bp
index 4638ab3..bcd176f 100644
--- a/lib/ubsan/Android.bp
+++ b/lib/ubsan/Android.bp
@@ -30,12 +30,15 @@
"ubsan_type_hash_win.cc",
]
+ubsan_rtl_cflags = [
+ "-Wall",
+ "-Werror",
+]
+
ubsan_rtl_cppflags = [
"-fvisibility=hidden",
"-fno-exceptions",
"-std=c++11",
- "-Wall",
- "-Werror",
"-Wno-unused-parameter",
"-Wno-non-virtual-dtor",
"-DUBSAN_CAN_USE_CXXABI",
@@ -48,6 +51,7 @@
host_supported: true,
include_dirs: ubsan_rtl_c_includes,
+ cflags: ubsan_rtl_cflags,
cppflags: ubsan_rtl_cppflags,
srcs: ubsan_rtl_files,
sdk_version: "19",
@@ -68,6 +72,7 @@
host_supported: true,
include_dirs: ubsan_rtl_c_includes,
+ cflags: ubsan_rtl_cflags,
cppflags: ubsan_rtl_cppflags,
rtti: true,
srcs: ubsan_cxx_rtl_files,
@@ -175,6 +180,7 @@
name: "libubsan_standalone",
include_dirs: ubsan_rtl_c_includes,
+ cflags: ubsan_rtl_cflags,
cppflags: ubsan_rtl_cppflags + ["-fno-rtti"],
srcs: ubsan_rtl_files,
whole_static_libs: ["libsan"],
@@ -194,6 +200,7 @@
name: "libubsan_standalone_cxx",
include_dirs: ubsan_rtl_c_includes,
+ cflags: ubsan_rtl_cflags,
cppflags: ubsan_rtl_cppflags,
srcs: ubsan_cxx_rtl_files,
sanitize: {