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

Unified Diff: build/config/compiler/BUILD.gn

Issue 1552863004: Linux/CrOS/Cast/Android (and Mac with gn): Build chromium_code with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months 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
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 97eb6726ca36455f5b87284c80ecc8c85f8c875e..ef3fc3400b48a018e690048adf85c7da43ffc485 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -894,15 +894,11 @@ config("chromium_code") {
if (is_win) {
cflags = [ "/W4" ] # Warning level 4.
} else {
- cflags = [
- "-Wall",
-
- # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
- # so we specify it explicitly.
- # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
- # http://code.google.com/p/chromium/issues/detail?id=90453
- "-Wsign-compare",
- ]
+ cflags = [ "-Wall" ]
+ if (is_clang) {
+ # Enable -Wextra for chromium_code when we control the compiler.
+ cflags += [ "-Wextra" ]
+ }
# In Chromium code, we define __STDC_foo_MACROS in order to get the
# C99 macros on Mac and Linux.
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698