Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default-enable llvm_tools_enabled when no config.toml is present #133207

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
Kobzol marked this conversation as resolved.
Show resolved Hide resolved

..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.",
},
];
Loading