Enable relocations for BOLT
This commit is contained in:
parent
240a7dd02e
commit
589e38a413
@ -217,6 +217,12 @@ fn main() {
|
|||||||
eprintln!("{prefix} libdir: {libdir:?}");
|
eprintln!("{prefix} libdir: {libdir:?}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if env::var_os("RUSTC_BOLT_LINK_FLAGS").is_some() {
|
||||||
|
if let Some("rustc_driver") = crate_name {
|
||||||
|
cmd.arg("-Clink-args=-Wl,-q");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let start = Instant::now();
|
let start = Instant::now();
|
||||||
let (child, status) = {
|
let (child, status) = {
|
||||||
let errmsg = format!("\nFailed to run:\n{cmd:?}\n-------------");
|
let errmsg = format!("\nFailed to run:\n{cmd:?}\n-------------");
|
||||||
|
@ -906,6 +906,11 @@ fn run(self, builder: &Builder<'_>) {
|
|||||||
cargo.arg("-p").arg(krate);
|
cargo.arg("-p").arg(krate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if compiler.stage == 1 {
|
||||||
|
// Relocations are required for BOLT to work.k
|
||||||
|
cargo.env("RUSTC_BOLT_LINK_FLAGS", "1");
|
||||||
|
}
|
||||||
|
|
||||||
let _guard = builder.msg_sysroot_tool(
|
let _guard = builder.msg_sysroot_tool(
|
||||||
Kind::Build,
|
Kind::Build,
|
||||||
compiler.stage,
|
compiler.stage,
|
||||||
|
Loading…
Reference in New Issue
Block a user