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 /skia | |
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 'skia')
-rw-r--r-- | skia/skia_chrome.gypi | 20 | ||||
-rw-r--r-- | skia/skia_common.gypi | 5 | ||||
-rw-r--r-- | skia/skia_library.gypi | 12 |
3 files changed, 12 insertions, 25 deletions
diff --git a/skia/skia_chrome.gypi b/skia/skia_chrome.gypi index 99c7134..1637e88 100644 --- a/skia/skia_chrome.gypi +++ b/skia/skia_chrome.gypi @@ -19,7 +19,13 @@ 'ext', ], }, - + 'variables': { + # TODO(scottmg): http://crbug.com/177306 + 'clang_warning_flags_unset': [ + # Don't warn about string->bool used in asserts. + '-Wstring-conversion', + ], + }, 'sources': [ # Note: file list duplicated in GN build. 'ext/analysis_canvas.cc', @@ -99,18 +105,6 @@ 'skia_chrome_opts', ], }], - # TODO(scottmg): http://crbug.com/177306 - ['clang==1', { - 'xcode_settings': { - 'WARNING_CFLAGS!': [ - # Don't warn about string->bool used in asserts. - '-Wstring-conversion', - ], - }, - 'cflags!': [ - '-Wstring-conversion', - ], - }], [ 'OS != "android" and (OS != "linux" or use_cairo==1)', { 'sources!': [ 'ext/bitmap_platform_device_skia.cc', diff --git a/skia/skia_common.gypi b/skia/skia_common.gypi index d56070e..2d89b4c 100644 --- a/skia/skia_common.gypi +++ b/skia/skia_common.gypi @@ -137,6 +137,11 @@ 'skia_support_pdf': 1, }], ], + # TODO(scottmg): http://crbug.com/177306 + 'clang_warning_flags': [ + # Don't warn about string->bool used in asserts. + '-Wstring-conversion', + ] }, 'skia_support_gpu': '<(skia_support_gpu)', 'skia_support_pdf': '<(skia_support_pdf)', diff --git a/skia/skia_library.gypi b/skia/skia_library.gypi index 7410d7c..d1fd91e 100644 --- a/skia/skia_library.gypi +++ b/skia/skia_library.gypi @@ -358,18 +358,6 @@ '../third_party/skia/src/utils/win/SkHRESULT.cpp', ], }], - # TODO(scottmg): http://crbug.com/177306 - ['clang==1', { - 'xcode_settings': { - 'WARNING_CFLAGS!': [ - # Don't warn about string->bool used in asserts. - '-Wstring-conversion', - ], - }, - 'cflags!': [ - '-Wstring-conversion', - ], - }], ], 'target_conditions': [ # Pull in specific Mac files for iOS (which have been filtered out |