aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2017-09-30 01:09:59 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-09-30 01:09:59 +0000
commit81f9bf6f86d75e002b57abad2367dce8d3042c98 (patch)
tree897fd693bb6dbed7267e332943b54ff09eba72c0
parentf47b49a71824da471087f35b509c8bda3885f7a4 (diff)
parentd270761cb23bb8e51c9a6e99961219d9cecd248c (diff)
downloadcompiler-rt-81f9bf6f86d75e002b57abad2367dce8d3042c98.tar.gz
Merge "Use -Werror in external/compiler-rt" am: b7a99780f9 am: 9020d5ed4b am: 5ef9221d1e
am: d270761cb2 Change-Id: If7eb37853036f3a5df82476833e90928224f477f
-rw-r--r--lib/asan/Android.bp7
-rw-r--r--lib/interception/Android.bp6
-rw-r--r--lib/lsan/Android.bp2
-rw-r--r--lib/sanitizer_common/Android.bp6
-rw-r--r--lib/sanitizer_common/tests/Android.bp6
-rw-r--r--lib/tsan/Android.bp11
-rw-r--r--lib/ubsan/Android.bp11
7 files changed, 39 insertions, 10 deletions
diff --git a/lib/asan/Android.bp b/lib/asan/Android.bp
index d453d6338..520985c4c 100644
--- a/lib/asan/Android.bp
+++ b/lib/asan/Android.bp
@@ -51,6 +51,8 @@ asan_rtl_cflags = [
"-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 @@ cc_binary {
srcs: ["asanwrapper.cc"],
+ cflags: ["-Wall", "-Werror"],
cppflags: ["-std=c++11"],
sanitize: {
never: true,
@@ -233,6 +236,8 @@ cc_library_static {
"external/compiler-rt/lib/sanitizer_common/tests",
],
cflags: [
+ "-Wall",
+ "-Werror",
"-Wno-non-virtual-dtor",
"-Wno-unused-parameter",
"-Wno-sign-compare",
@@ -273,6 +278,8 @@ cc_test {
"-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 939bc244c..edca9e647 100644
--- a/lib/interception/Android.bp
+++ b/lib/interception/Android.bp
@@ -21,12 +21,14 @@ cc_library_static {
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 6fe75d48c..80e43be36 100644
--- a/lib/lsan/Android.bp
+++ b/lib/lsan/Android.bp
@@ -33,6 +33,8 @@ cc_library_static {
"-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 de8cf61d4..378376735 100644
--- a/lib/sanitizer_common/Android.bp
+++ b/lib/sanitizer_common/Android.bp
@@ -24,14 +24,16 @@ cc_library_static {
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 2dd364223..02d7dafe3 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 79de623bd..13eb7dac0 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 @@ cc_library_host_static {
name: "libtsan",
include_dirs: ["external/compiler-rt/lib"],
+ cflags: tsan_rtl_cflags,
cppflags: tsan_rtl_cppflags,
srcs: [
"rtl/*.cc",
@@ -55,6 +59,7 @@ cc_library_host_static {
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 @@ cc_test_host {
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 @@ cc_test_host {
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 4638ab351..bcd176f16 100644
--- a/lib/ubsan/Android.bp
+++ b/lib/ubsan/Android.bp
@@ -30,12 +30,15 @@ ubsan_cxx_rtl_files = [
"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 @@ cc_library_static {
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 @@ cc_library_static {
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 @@ cc_library_host_static {
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 @@ cc_library_host_static {
name: "libubsan_standalone_cxx",
include_dirs: ubsan_rtl_c_includes,
+ cflags: ubsan_rtl_cflags,
cppflags: ubsan_rtl_cppflags,
srcs: ubsan_cxx_rtl_files,
sanitize: {