Skip to content

Commit 034e440

Browse files
danakjAravind Vasudevan
authored andcommitted
Revert "Use lld linker when building rustc."
This reverts commit 0faa2994034a93d10a81bf6763fbe03205925505. Reason for revert: Rust did not build = note: ld.lld: error: version script assignment of 'global' to symbol '__rust_alloc' failed: symbol not defined ld.lld: error: version script assignment of 'global' to symbol '__rust_alloc_error_handler' failed: symbol not defined ld.lld: error: version script assignment of 'global' to symbol '__rust_alloc_error_handler_should_panic' failed: symbol not defined ld.lld: error: version script assignment of 'global' to symbol '__rust_alloc_error_handler_should_panic' failed: symbol not defined ld.lld: error: version script assignment of 'global' to symbol '__rust_alloc_zeroed' failed: symbol not defined ld.lld: error: version script assignment of 'global' to symbol '__rust_dealloc' failed: symbol not defined ld.lld: error: version script assignment of 'global' to symbol '__rust_realloc' failed: symbol not defined Original change's description: > 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. > > R=​[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} Bug: 1401042 Change-Id: Ie5d3ec6be4e65193d6fe2bdf62dc36905936b4aa No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4225891 Bot-Commit: Rubber Stamper <[email protected]> Commit-Queue: danakj <[email protected]> Cr-Commit-Position: refs/heads/main@{#1101644} NOKEYCHECK=True GitOrigin-RevId: 1092e6d4bdbd9fe11c4f077c9482c9b0ffac6990
1 parent 9f20c26 commit 034e440

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

build_rust.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,6 @@ 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'
260258

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

0 commit comments

Comments
 (0)