summaryrefslogtreecommitdiffstats
path: root/build/config
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-12-31 22:55:50 -0500
committerNico Weber <thakis@chromium.org>2016-01-01 03:57:06 +0000
commitfc84336d83b1e8feb752d7170bdba3f44ff069a4 (patch)
treec72cf2633a905be7f2f648832104d9ef5c8d1a18 /build/config
parent9830789346abd3d8211deff1ebe7a7f5753ba3fc (diff)
downloadchromium_src-fc84336d83b1e8feb752d7170bdba3f44ff069a4.zip
chromium_src-fc84336d83b1e8feb752d7170bdba3f44ff069a4.tar.gz
chromium_src-fc84336d83b1e8feb752d7170bdba3f44ff069a4.tar.bz2
Linux/CrOS/Cast/Android (and Mac with gn): Build chromium_code with -Wextra.
Lands the -Wextra bits of https://codereview.chromium.org/1551753002/ (reviewed there). Windows, Mac, and iOS already build chromium_code with -Wextra. (Mac and iOS only in the gyp build, not in gn yet.) This makes the other platforms match and also adds -Wextra to chromium_code in gn builds. BUG=573250,572776 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1552863004 . Cr-Commit-Position: refs/heads/master@{#367256}
Diffstat (limited to 'build/config')
-rw-r--r--build/config/compiler/BUILD.gn14
1 files changed, 5 insertions, 9 deletions
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 97eb672..ef3fc34 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.