Skip to content

Commit 75a9f01

Browse files
committed
Provided default config and applied fix from rust-lang#132720
1 parent e459bfb commit 75a9f01

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

config.toml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Includes one of the default files in src/bootstrap/defaults
2+
profile = "dist"
3+
change-id = 132494
4+
5+
[rust]
6+
llvm-tools = false
7+
8+
[llvm]
9+
download-ci-llvm = false
10+
11+
[build]
12+
sanitizers = true

src/bootstrap/src/core/build_steps/compile.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -1976,9 +1976,13 @@ impl Step for Assemble {
19761976
}
19771977
}
19781978

1979-
{
1980-
// `llvm-strip` is used by rustc, which is actually just a symlink to `llvm-objcopy`,
1981-
// so copy and rename `llvm-objcopy`.
1979+
if builder.config.llvm_enabled(target_compiler.host) && builder.config.llvm_tools_enabled {
1980+
// `llvm-strip` is used by rustc, which is actually just a symlink to `llvm-objcopy`, so
1981+
// copy and rename `llvm-objcopy`.
1982+
//
1983+
// But only do so if llvm-tools are enabled, as bootstrap compiler might not contain any
1984+
// LLVM tools, e.g. for cg_clif.
1985+
// See <https://github.com/rust-lang/rust/issues/132719>.
19821986
let src_exe = exe("llvm-objcopy", target_compiler.host);
19831987
let dst_exe = exe("rust-objcopy", target_compiler.host);
19841988
builder.copy_link(&libdir_bin.join(src_exe), &libdir_bin.join(dst_exe));

0 commit comments

Comments
 (0)