Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Unified Diff: third_party/android_protobuf/BUILD.gn

Issue 1551753002: Build third-party code with -Wall, build chromium_code with -Wextra on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo jni_generator change after agrieve fix Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..387d028bd20279cfa2809d03e39d433a1fd7ea96 100644
--- a/third_party/android_protobuf/BUILD.gn
+++ b/third_party/android_protobuf/BUILD.gn
@@ -3,10 +3,26 @@
# found in the LICENSE file.
if (current_toolchain == host_toolchain) {
+ config("android_protoc_warnings") {
+ if (is_clang) {
Lei Zhang 2015/12/31 00:07:37 No if statement since the gyp version has these in
Nico 2015/12/31 02:44:17 Done, good point, thanks.
+ 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 +130,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.

Powered by Google App Engine
This is Rietveld 408576698