diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-01 21:48:20 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-01 21:48:20 +0000 |
commit | dcbc32cc8063d329ba9128807b05d912d7d3679e (patch) | |
tree | bf324560733b8934c67618da0f78424d600992f8 /breakpad | |
parent | 83d8f4397e93d9ac62b70266e99b57217e9b5283 (diff) | |
download | chromium_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 'breakpad')
-rw-r--r-- | breakpad/breakpad.gyp | 12 | ||||
-rw-r--r-- | breakpad/breakpad_tools.gypi | 9 |
2 files changed, 9 insertions, 12 deletions
diff --git a/breakpad/breakpad.gyp b/breakpad/breakpad.gyp index 80cfc6a..18a4355 100644 --- a/breakpad/breakpad.gyp +++ b/breakpad/breakpad.gyp @@ -580,6 +580,12 @@ 'breakpad_processor_support', 'linux_dumper_unittest_helper', ], + 'variables': { + 'clang_warning_flags': [ + # See http://crbug.com/138571#c18 + '-Wno-unused-value', + ], + }, 'sources': [ 'linux/breakpad_googletest_includes.h', @@ -616,12 +622,6 @@ '.', ], 'conditions': [ - [ 'clang == 1', { - 'cflags': [ - # See http://crbug.com/138571#c18 - '-Wno-unused-value', - ], - }], ['OS=="android"', { 'libraries': [ '-llog', diff --git a/breakpad/breakpad_tools.gypi b/breakpad/breakpad_tools.gypi index 48dc050..066dfc1 100644 --- a/breakpad/breakpad_tools.gypi +++ b/breakpad/breakpad_tools.gypi @@ -7,13 +7,10 @@ ['OS=="android"', { 'toolsets': ['host'], }], - ['clang==1', { - 'cflags': ['-Wno-tautological-constant-out-of-range-compare'], - 'xcode_settings': { - 'WARNING_CFLAGS': ['-Wno-tautological-constant-out-of-range-compare'], - }, - }], ], + 'variables': { + 'clang_warning_flags': ['-Wno-tautological-constant-out-of-range-compare'], + }, 'include_dirs': [ 'src', 'src/third_party', |