We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 240a7dd commit 589e38aCopy full SHA for 589e38a
src/bootstrap/bin/rustc.rs
@@ -217,6 +217,12 @@ fn main() {
217
eprintln!("{prefix} libdir: {libdir:?}");
218
}
219
220
+ if env::var_os("RUSTC_BOLT_LINK_FLAGS").is_some() {
221
+ if let Some("rustc_driver") = crate_name {
222
+ cmd.arg("-Clink-args=-Wl,-q");
223
+ }
224
225
+
226
let start = Instant::now();
227
let (child, status) = {
228
let errmsg = format!("\nFailed to run:\n{cmd:?}\n-------------");
src/bootstrap/compile.rs
@@ -906,6 +906,11 @@ impl Step for Rustc {
906
cargo.arg("-p").arg(krate);
907
908
909
+ if compiler.stage == 1 {
910
+ // Relocations are required for BOLT to work.k
911
+ cargo.env("RUSTC_BOLT_LINK_FLAGS", "1");
912
913
914
let _guard = builder.msg_sysroot_tool(
915
Kind::Build,
916
compiler.stage,
0 commit comments