Index: third_party/android_protobuf/BUILD.gn |
diff --git a/third_party/android_protobuf/BUILD.gn b/third_party/android_protobuf/BUILD.gn |
index 266ca83a7ae5631ac756fc16abcefc42b28a0756..79d5c4a247a0beb83d8d5e2328e516900ab3aa75 100644 |
--- a/third_party/android_protobuf/BUILD.gn |
+++ b/third_party/android_protobuf/BUILD.gn |
@@ -3,10 +3,24 @@ |
# found in the LICENSE file. |
if (current_toolchain == host_toolchain) { |
+ config("android_protoc_warnings") { |
+ cflags = [ |
+ "-Wno-null-conversion", |
+ "-Wno-tautological-undefined-compare", |
+ "-Wno-unused-function", |
+ "-Wno-unused-local-typedef", |
+ ] |
+ } |
+ |
# GYP: //third_party/android_protobuf/android_protobuf.gyp:android_protoc |
executable("android_protoc") { |
configs -= [ "//build/config/compiler:chromium_code" ] |
- configs += [ "//build/config/compiler:no_chromium_code" ] |
+ configs += [ |
+ "//build/config/compiler:no_chromium_code", |
+ |
+ # Must be after no_chromium_code so warning flags are ordered correctly. |
+ ":android_protoc_warnings", |
+ ] |
deps = [ |
"//build/config/sanitizers:deps", |
@@ -114,12 +128,6 @@ if (current_toolchain == host_toolchain) { |
"src/src", |
] |
- if (is_clang) { |
- cflags = [ |
- "-Wno-null-conversion", |
- "-Wno-tautological-undefined-compare", |
- ] |
- } |
defines = [ |
# This macro must be defined to suppress the use |
# of dynamic_cast<>, which requires RTTI. |