summaryrefslogtreecommitdiffstats
path: root/third_party/zlib
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-01 21:48:20 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-01 21:48:20 +0000
commitdcbc32cc8063d329ba9128807b05d912d7d3679e (patch)
treebf324560733b8934c67618da0f78424d600992f8 /third_party/zlib
parent83d8f4397e93d9ac62b70266e99b57217e9b5283 (diff)
downloadchromium_src-dcbc32cc8063d329ba9128807b05d912d7d3679e.zip
chromium_src-dcbc32cc8063d329ba9128807b05d912d7d3679e.tar.gz
chromium_src-dcbc32cc8063d329ba9128807b05d912d7d3679e.tar.bz2
Refactor how clang warning flags are set.
Previously, every gyp file that wanted to set clang warnings had to check for clang==1 and then set cflags and xcode_settings.WARNING_CFLAGS. Factor this out, so that targets only need to set clang_warning_flags for warnings that apply to all platforms. (Per-platform flags still need to be set manually.) This removes existing duplication from gyp files, and prevents adding more duplication when trying to add the same warning flags for clang/win. BUG=82385 R=hans@chromium.org, scottmg@chromium.org TBR=various owners Review URL: https://codereview.chromium.org/437543007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287092 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/zlib')
-rw-r--r--third_party/zlib/zlib.gyp17
1 files changed, 6 insertions, 11 deletions
diff --git a/third_party/zlib/zlib.gyp b/third_party/zlib/zlib.gyp
index 279a6e8..aef41ac 100644
--- a/third_party/zlib/zlib.gyp
+++ b/third_party/zlib/zlib.gyp
@@ -77,6 +77,12 @@
'.',
],
},
+ 'variables': {
+ 'clang_warning_flags': [
+ # zlib uses `if ((a == b))` for some reason.
+ '-Wno-parentheses-equality',
+ ],
+ },
'conditions': [
['OS!="win"', {
'sources!': [
@@ -94,17 +100,6 @@
'USE_FILE32API'
],
}],
- ['clang==1', {
- 'xcode_settings': {
- 'WARNING_CFLAGS': [
- # zlib uses `if ((a == b))` for some reason.
- '-Wno-parentheses-equality',
- ],
- },
- 'cflags': [
- '-Wno-parentheses-equality',
- ],
- }],
],
},
],