Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: infra/bots/recipe_modules/skia/gn_flavor.py

Issue 2186553006: GN: use ccache if available and the requested compiler. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: quotes Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra/bots/recipe_modules/skia/fake_specs.py ('k') | infra/bots/recipes/swarm_compile.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/recipe_modules/skia/gn_flavor.py
diff --git a/infra/bots/recipe_modules/skia/gn_flavor.py b/infra/bots/recipe_modules/skia/gn_flavor.py
index d7fa86c77f3836763d6fea0615520c68e7102538..cdb26e0631f9b192d891fc6f540047859d7a0b11 100644
--- a/infra/bots/recipe_modules/skia/gn_flavor.py
+++ b/infra/bots/recipe_modules/skia/gn_flavor.py
@@ -18,6 +18,18 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
is_debug = 'is_debug=false'
gn_args = [is_debug]
+ cc, cxx = 'cc', 'c++'
+ if 'Clang' in self._skia_api.builder_name:
+ cc, cxx = 'clang', 'clang++'
+ elif 'GCC' in self._skia_api.builder_name:
+ cc, cxx = 'gcc', 'g++'
+
+ ccache = self._skia_api.ccache()
+ if ccache:
+ cc, cxx = '"%s %s"' % (ccache, cc), '"%s %s"' % (ccache, cxx)
+
+ gn_args += [ 'cc=' + cc, 'cxx=' + cxx ]
+
# Run gn gen.
gn_exe = 'gn'
if self._skia_api.m.platform.is_win:
« no previous file with comments | « infra/bots/recipe_modules/skia/fake_specs.py ('k') | infra/bots/recipes/swarm_compile.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698