Skip to content

Commit 49aec06

Browse files
authored
Rollup merge of #133207 - jieyouxu:macos-objcopy, r=Kobzol,bjorn3
Default-enable `llvm_tools_enabled` when no `config.toml` is present Fixes #133195. cc `@wesleywiser` could you double check if with this patch and no `config.toml` that you can run `./x test tests/ui --stage 1`? `llvm-objcopy` is usually required by cg_ssa on macOS to workaround bad `strip`s. cc `@bjorn3` I hope this doesn't break cg_clif... r? bootstrap
2 parents 841243f + 4b5c883 commit 49aec06

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

Diff for: compiler/rustc_codegen_cranelift/scripts/setup_rust_fork.sh

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ local-rebuild = true
3838
codegen-backends = ["cranelift"]
3939
deny-warnings = false
4040
verbose-tests = false
41+
# The cg_clif sysroot doesn't contain llvm tools and unless llvm_tools is
42+
# disabled bootstrap will crash trying to copy llvm tools for the bootstrap
43+
# compiler.
44+
llvm_tools = false
45+
4146
EOF
4247
popd
4348

Diff for: src/bootstrap/src/core/config/config.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,10 @@ impl Config {
12551255
},
12561256
out: PathBuf::from("build"),
12571257

1258+
// This is needed by codegen_ssa on macOS to ship `llvm-objcopy` aliased to
1259+
// `rust-objcopy` to workaround bad `strip`s on macOS.
1260+
llvm_tools_enabled: true,
1261+
12581262
..Default::default()
12591263
}
12601264
}

Diff for: src/bootstrap/src/utils/change_tracker.rs

+5
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
300300
severity: ChangeSeverity::Info,
301301
summary: "`download-rustc='if-unchanged'` is now a default option for library profile.",
302302
},
303+
ChangeInfo {
304+
change_id: 133207,
305+
severity: ChangeSeverity::Info,
306+
summary: "`rust.llvm-tools` is now enabled by default when no `config.toml` is provided.",
307+
},
303308
];

0 commit comments

Comments
 (0)