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

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

Issue 2301273002: GN: Build and link with LLD when using our Clang toolchain. (Closed)
Patch Set: v3 Created 4 years, 3 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
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 f759d4bcc4edbabb7e6d52aed6c2ad701f0bfdb6..31b4756be0116842f08683d619c3ec9f3990491f 100644
--- a/infra/bots/recipe_modules/flavor/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -29,10 +29,12 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
cc, cxx = 'cc', 'c++'
extra_cflags = []
+ extra_ldflags = []
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++')
+ extra_ldflags.append('-fuse-ld=lld')
elif compiler == 'Clang':
cc, cxx = 'clang', 'clang++'
elif compiler == 'GCC':
@@ -57,6 +59,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
'cxx': quote(cxx),
'compiler_prefix': quote(compiler_prefix),
'extra_cflags': quote(' '.join(extra_cflags)),
+ 'extra_ldflags': quote(' '.join(extra_ldflags)),
'is_debug': 'true' if configuration == 'Debug' else 'false',
}.iteritems()))

Powered by Google App Engine
This is Rietveld 408576698