Skip to content

Commit

Permalink
Unrolled build for rust-lang#133207
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#133207 - jieyouxu:macos-objcopy, r=Kobzol,bjorn3

Default-enable `llvm_tools_enabled` when no `config.toml` is present

Fixes rust-lang#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
  • Loading branch information
rust-timer authored Nov 20, 2024
2 parents ee612c4 + 4b5c883 commit 166cf0a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/rustc_codegen_cranelift/scripts/setup_rust_fork.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ local-rebuild = true
codegen-backends = ["cranelift"]
deny-warnings = false
verbose-tests = false
# The cg_clif sysroot doesn't contain llvm tools and unless llvm_tools is
# disabled bootstrap will crash trying to copy llvm tools for the bootstrap
# compiler.
llvm_tools = false
EOF
popd

Expand Down
4 changes: 4 additions & 0 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,10 @@ impl Config {
},
out: PathBuf::from("build"),

// This is needed by codegen_ssa on macOS to ship `llvm-objcopy` aliased to
// `rust-objcopy` to workaround bad `strip`s on macOS.
llvm_tools_enabled: true,

..Default::default()
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/bootstrap/src/utils/change_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,4 +300,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
severity: ChangeSeverity::Info,
summary: "`download-rustc='if-unchanged'` is now a default option for library profile.",
},
ChangeInfo {
change_id: 133207,
severity: ChangeSeverity::Info,
summary: "`rust.llvm-tools` is now enabled by default when no `config.toml` is provided.",
},
];

0 comments on commit 166cf0a

Please sign in to comment.