Skip to content

Commit

Permalink
Rollup merge of #123189 - Kobzol:rustc-shim-log, r=onur-ozkan
Browse files Browse the repository at this point in the history
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](#116352 (comment)).
  • Loading branch information
matthiaskrgr committed Mar 31, 2024
2 parents c93b17d + a4087b7 commit 0928a54
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/bootstrap/src/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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();
Expand Down

0 comments on commit 0928a54

Please sign in to comment.