summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 11:51:06 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 11:51:06 +0000
commit4c4c2e533dcc20d0703ada542e8db51853cb2c3a (patch)
treed2e6701dd8bbd15cc728ce210d767da937514885 /build
parentbf279b47dab615a0007ee73a51d8d6115475eba7 (diff)
downloadchromium_src-4c4c2e533dcc20d0703ada542e8db51853cb2c3a.zip
chromium_src-4c4c2e533dcc20d0703ada542e8db51853cb2c3a.tar.gz
chromium_src-4c4c2e533dcc20d0703ada542e8db51853cb2c3a.tar.bz2
Add support for turning on -Wextra on the mac. Doesn't compile that way, but makes it easier to enable it in a build to start working toward it.
BUG=34160 TEST=none Review URL: http://codereview.chromium.org/2822004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49785 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/common.gypi16
1 files changed, 15 insertions, 1 deletions
diff --git a/build/common.gypi b/build/common.gypi
index e449de0..e2da12b 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -166,6 +166,10 @@
'mac_sdk%': '10.5',
'mac_deployment_target%': '10.5',
+ # Turn on -Wextra on chromium code during Mac compile.
+ # TODO(mark,tvl): drop this and turn it always on when it works.
+ 'chromium_mac_wextra%': 0,
+
# Set to 1 to enable code coverage. In addition to build changes
# (e.g. extra CFLAGS), also creates a new target in the src/chrome
# project file called "coverage".
@@ -521,7 +525,7 @@
[ 'OS=="mac"', {
'xcode_settings': {
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
- 'WARNING_CFLAGS!': ['-Wall'],
+ 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
},
}],
],
@@ -1147,6 +1151,16 @@
['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
{'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
],
+ ['chromium_mac_wextra', {
+ 'WARNING_CFLAGS': [
+ '-Wextra',
+ # Don't warn about unused function params. Used everywhere.
+ '-Wno-unused-parameter',
+ # Don't warn about the "struct foo f = {0};" initialization
+ # pattern.
+ '-Wno-missing-field-initializers',
+ ]
+ }],
],
},
'target_conditions': [