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

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

Issue 2281163002: GN: support compiler_prefix, use it for ccache on bots. (Closed)
Patch Set: Created 4 years, 4 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 | « gn/BUILD.gn ('k') | infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/recipe_modules/flavor/gn_flavor.py
diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py
index 75c318f818335c16c32bb3ac0e7150100b18efdb..cba72a84673488ea2f03ccac8d771202244545c5 100644
--- a/infra/bots/recipe_modules/flavor/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -29,9 +29,10 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
elif compiler == 'GCC':
cc, cxx = 'gcc', 'g++'
+ compiler_prefix = ""
ccache = self.m.run.ccache()
if ccache:
- cc, cxx = '%s %s' % (ccache, cc), '%s %s' % (ccache, cxx)
+ compiler_prefix = ccache
if compiler == 'Clang':
# Stifle "argument unused during compilation: ..." warnings.
extra_cflags.append('-Qunused-arguments')
@@ -45,6 +46,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in {
'cc': quote(cc),
'cxx': quote(cxx),
+ 'compiler_prefix': quote(compiler_prefix),
'extra_cflags': quote(' '.join(extra_cflags)),
'is_debug': 'true' if configuration == 'Debug' else 'false',
}.iteritems())
« no previous file with comments | « gn/BUILD.gn ('k') | infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698