diff options
author | mtklein <mtklein@chromium.org> | 2016-07-29 06:03:52 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-29 06:03:52 -0700 |
commit | 830c913625ac62b16b09cc0f1dbd8f177ec493d9 (patch) | |
tree | adccc9910cd37870f674ee48dbaad1149ac4d5b2 | |
parent | 2a1134e3f5015afe596703a584a63f5bcd375836 (diff) |
GN: ccache+clang needs -Qunused-arguments
An alternative is to define CCACHE_CPP2, but
I thought I'd try this more visible way first.
(CCACHE_CPP2 may turn out to be required anyway
if we start seeing warnings about tautological compares.)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193203002
TBR=jcgregorio@google.com
NOTRY=true
Review-Url: https://codereview.chromium.org/2193203002
-rw-r--r-- | infra/bots/recipe_modules/skia/gn_flavor.py | 11 | ||||
-rw-r--r-- | infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/infra/bots/recipe_modules/skia/gn_flavor.py b/infra/bots/recipe_modules/skia/gn_flavor.py index c4988fbe16..7b60b9a1a0 100644 --- a/infra/bots/recipe_modules/skia/gn_flavor.py +++ b/infra/bots/recipe_modules/skia/gn_flavor.py @@ -18,15 +18,22 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils): is_debug = 'is_debug=false' gn_args = [is_debug] + is_clang = 'Clang' in self._skia_api.builder_name + is_gcc = 'GCC' in self._skia_api.builder_name + cc, cxx = 'cc', 'c++' - if 'Clang' in self._skia_api.builder_name: + if is_clang: cc, cxx = 'clang', 'clang++' - elif 'GCC' in self._skia_api.builder_name: + elif is_gcc: cc, cxx = 'gcc', 'g++' ccache = self._skia_api.ccache() if ccache: cc, cxx = '%s %s' % (ccache, cc), '%s %s' % (ccache, cxx) + if is_clang: + # Stifle "argument unused during compilation: ..." warnings. + stifle = '-Qunused-arguments' + cc, cxx = '%s %s' % (cc, stifle), '%s %s' % (cxx, stifle) gn_args += [ 'cc="%s"' % cc, 'cxx="%s"' % cxx ] diff --git a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json index 91ca8c05d7..1658b3b3eb 100644 --- a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json +++ b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json @@ -164,7 +164,7 @@ "gn", "gen", "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-GN/Debug", - "--args=is_debug=true cc=\"/usr/bin/ccache clang\" cxx=\"/usr/bin/ccache clang++\"" + "--args=is_debug=true cc=\"/usr/bin/ccache clang -Qunused-arguments\" cxx=\"/usr/bin/ccache clang++ -Qunused-arguments\"" ], "cwd": "[CUSTOM_/_B_WORK]/skia", "env": { |