Skip to content

Commit 9f20c26

Browse files
danakjAravind Vasudevan
authored andcommitted
Use lld linker when building rustc.
This was unintentionally removed in https://chromium-review.googlesource.com/c/chromium/src/+/4100425 when removing adjacent flags in the same string. We use lld linker for all C++ linking in the chromium build too, and we pass the same flag to Rust for linux and mac as well. [email protected], [email protected] Bug: 1401042 Change-Id: Icbf8ddf100ab525e5ff03144f4a6b1e21bf6feb5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4220699 Reviewed-by: Hans Wennborg <[email protected]> Auto-Submit: danakj <[email protected]> Commit-Queue: Hans Wennborg <[email protected]> Cr-Commit-Position: refs/heads/main@{#1101504} NOKEYCHECK=True GitOrigin-RevId: 0faa2994034a93d10a81bf6763fbe03205925505
1 parent d98f23f commit 9f20c26

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

build_rust.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ def RunXPy(sub, args, llvm_bins_path, zlib_path, libxml2_dirs, build_mac_arm,
255255
RUSTENV['AR'] = os.path.join(llvm_bins_path, 'llvm-ar')
256256
RUSTENV['CC'] = os.path.join(llvm_bins_path, 'clang')
257257
RUSTENV['CXX'] = os.path.join(llvm_bins_path, 'clang++')
258+
RUSTENV['RUSTFLAGS_BOOTSTRAP'] += f' -Clink-arg=-fuse-ld=lld'
259+
RUSTENV['RUSTFLAGS_NOT_BOOTSTRAP'] += f' -Clink-arg=-fuse-ld=lld'
258260

259261
if sys.platform == 'darwin':
260262
# The system/xcode compiler would find system SDK correctly, but

0 commit comments

Comments
 (0)