aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2017-10-12 21:55:20 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-10-12 21:55:20 +0000
commit02bfd0022fcf6693ce9817ebe6811107c22a8aac (patch)
treeea2649e912e188e90be464636cf6cd101e0ce6d7
parent85d4917ad9871d38829aa5a11326a3520850e150 (diff)
parent2d5e468cd76b98f9188de0710dd5d54a4eb0cf46 (diff)
downloadprotobuf-02bfd0022fcf6693ce9817ebe6811107c22a8aac.tar.gz
Merge "Use -Werror in external/protobuf" am: 472a4b15fd am: bcc5a4247c am: f5619425c3
am: 2d5e468cd7 Change-Id: Ia393b29ea8fe8ca9c0676f48cf701b8eb45b79df
-rw-r--r--Android.bp27
1 files changed, 27 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 75417dd74..508132cd6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -22,7 +22,33 @@ IGNORED_WARNINGS = [
]
cc_defaults {
+ name: "protobuf-cflags-defaults",
+ clang_cflags: [
+ "-Wno-error=unused-const-variable",
+ "-Wno-error=user-defined-warnings",
+ ],
+ cflags: [
+ "-Wall",
+ "-Wno-error=format",
+ "-Wno-error=format-extra-args",
+ "-Wno-error=ignored-qualifiers",
+ "-Wno-error=sign-promo",
+ "-Wno-unused-function",
+ ],
+ target: {
+ android: {
+ cflags: ["-Werror"],
+ },
+ // cannot suppress gcc warning on redefined macros
+ not_windows: {
+ cflags: ["-Werror"],
+ },
+ },
+}
+
+cc_defaults {
name: "libprotobuf-cpp-lite-defaults",
+ defaults: ["protobuf-cflags-defaults"],
srcs: [
"src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc",
"src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc",
@@ -268,6 +294,7 @@ cc_library_host_shared {
// =======================================================
cc_binary_host {
name: "aprotoc",
+ defaults: ["protobuf-cflags-defaults"],
target: {
windows: {