Skip to content

Commit 2d062e9

Browse files
szilardszalokimkarolin
authored andcommitted
[cr137][rust] Use stage0's rust-lld instead of stage1.
See rust-lang/rust#139853. Chromium uses `llvm-config` in `config.toml.template` (https://source.chromium.org/chromium/chromium/src/+/3802adbb9d98955a972476a190b4bd015f45328e:tools/rust/config.toml.template;l=55,64,73,82), but the PR prevents building and copying `rust-lld` when `llvm-config` is being used.
1 parent faed716 commit 2d062e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build/rust/build_rust_toolchain_aux.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,15 @@ def create_archive():
9999
with brave_chromium_utils.sys_path(TOOLS_RUST):
100100
import build_rust
101101
target_triple = build_rust.RustTargetTriple()
102+
stage0_output_path = os.path.join(build_rust.RUST_BUILD_DIR,
103+
target_triple, 'stage0', 'lib',
104+
'rustlib')
102105
stage1_output_path = os.path.join(build_rust.RUST_BUILD_DIR,
103106
target_triple, 'stage1', 'lib',
104107
'rustlib')
105108

106109
with tarfile.open(package_name(), 'w:xz') as tar:
107-
tar.add(os.path.join(stage1_output_path, target_triple, 'bin',
110+
tar.add(os.path.join(stage0_output_path, target_triple, 'bin',
108111
RUST_LLD),
109112
arcname=RUST_LLD)
110113
tar.add(os.path.join(stage1_output_path, WASM32_UNKNOWN_UNKNOWN),

0 commit comments

Comments
 (0)