Rollup merge of #123189 - Kobzol:rustc-shim-log, r=onur-ozkan

Log BOLT args in bootstrap `rustc` shim

Before, the BOLT argument would not be logged, because it was only added after the logging has happened.

Found by `@RalfJung` [here](https://github.com/rust-lang/rust/pull/116352#discussion_r1544235771).
This commit is contained in:
Matthias Krüger 2024-03-31 11:50:40 +02:00 committed by GitHub
commit 0928a54a1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -220,6 +220,12 @@ fn main() {
}
}
if env::var_os("RUSTC_BOLT_LINK_FLAGS").is_some() {
if let Some("rustc_driver") = crate_name {
cmd.arg("-Clink-args=-Wl,-q");
}
}
let is_test = args.iter().any(|a| a == "--test");
if verbose > 2 {
let rust_env_vars =
@ -244,12 +250,6 @@ fn main() {
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");
}
}
bin_helpers::maybe_dump(format!("stage{stage}-rustc"), &cmd);
let start = Instant::now();