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

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

Issue 2294353002: Add and use a clang_linux asset. (Closed)
Patch Set: SAN|Clang 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 | « infra/bots/assets/clang_linux/upload.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/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 cba72a84673488ea2f03ccac8d771202244545c5..66497b5d584e6c3973761d6b5aa38d9d1dbcad33 100644
--- a/infra/bots/recipe_modules/flavor/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -20,11 +20,15 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
compiler = self.m.vars.builder_cfg.get('compiler', '')
configuration = self.m.vars.builder_cfg.get('configuration', '')
extra_config = self.m.vars.builder_cfg.get('extra_config', '')
+ os = self.m.vars.builder_cfg.get('os', '')
cc, cxx = 'cc', 'c++'
extra_cflags = []
- if compiler == 'Clang':
+ if compiler == 'Clang' and os == 'Ubuntu':
+ cc = self.m.vars.slave_dir.join('clang_linux', 'bin', 'clang')
+ cxx = self.m.vars.slave_dir.join('clang_linux', 'bin', 'clang++')
+ elif compiler == 'Clang':
cc, cxx = 'clang', 'clang++'
elif compiler == 'GCC':
cc, cxx = 'gcc', 'g++'
@@ -43,13 +47,13 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
extra_cflags.append('-D' + extra_config)
quote = lambda x: '"%s"' % x
- gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in {
+ gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted({
'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())
+ }.iteritems()))
run = lambda title, cmd: self.m.run(self.m.step, title, cmd=cmd,
cwd=self.m.vars.skia_dir, **kwargs)
« no previous file with comments | « infra/bots/assets/clang_linux/upload.py ('k') | infra/bots/recipes/swarm_compile.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698