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

bootstrap: Update the output of the check descriptions #108463

Merged
merged 1 commit into from
Feb 27, 2023
Merged
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
88 changes: 60 additions & 28 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,15 @@ impl Step for Std {
cargo.arg("--lib");
}

builder.info(&format!(
"Checking stage{} library artifacts ({} -> {})",
builder.top_stage, &compiler.host, target
));
let msg = if compiler.host == target {
format!("Checking stage{} library artifacts ({target})", builder.top_stage)
} else {
format!(
"Checking stage{} library artifacts ({} -> {})",
builder.top_stage, &compiler.host, target
)
};
builder.info(&msg);
run_cargo(
builder,
cargo,
Expand Down Expand Up @@ -162,10 +167,18 @@ impl Step for Std {
cargo.arg("-p").arg(krate.name);
}

builder.info(&format!(
"Checking stage{} library test/bench/example targets ({} -> {})",
builder.top_stage, &compiler.host, target
));
let msg = if compiler.host == target {
format!(
"Checking stage{} library test/bench/example targets ({target})",
builder.top_stage
)
} else {
format!(
"Checking stage{} library test/bench/example targets ({} -> {})",
builder.top_stage, &compiler.host, target
)
};
builder.info(&msg);
run_cargo(
builder,
cargo,
Expand Down Expand Up @@ -239,10 +252,15 @@ impl Step for Rustc {
cargo.arg("-p").arg(krate.name);
}

builder.info(&format!(
"Checking stage{} compiler artifacts ({} -> {})",
builder.top_stage, &compiler.host, target
));
let msg = if compiler.host == target {
format!("Checking stage{} compiler artifacts ({target})", builder.top_stage)
} else {
format!(
"Checking stage{} compiler artifacts ({} -> {})",
builder.top_stage, &compiler.host, target
)
};
builder.info(&msg);
run_cargo(
builder,
cargo,
Expand Down Expand Up @@ -299,10 +317,15 @@ impl Step for CodegenBackend {
.arg(builder.src.join(format!("compiler/rustc_codegen_{}/Cargo.toml", backend)));
rustc_cargo_env(builder, &mut cargo, target);

builder.info(&format!(
"Checking stage{} {} artifacts ({} -> {})",
builder.top_stage, backend, &compiler.host.triple, target.triple
));
let msg = if compiler.host == target {
format!("Checking stage{} {} artifacts ({target})", builder.top_stage, backend)
} else {
format!(
"Checking stage{} {} library ({} -> {})",
builder.top_stage, backend, &compiler.host.triple, target.triple
)
};
builder.info(&msg);

run_cargo(
builder,
Expand Down Expand Up @@ -362,10 +385,15 @@ impl Step for RustAnalyzer {
cargo.arg("--benches");
}

builder.info(&format!(
"Checking stage{} {} artifacts ({} -> {})",
compiler.stage, "rust-analyzer", &compiler.host.triple, target.triple
));
let msg = if compiler.host == target {
format!("Checking stage{} {} artifacts ({target})", compiler.stage, "rust-analyzer")
} else {
format!(
"Checking stage{} {} artifacts ({} -> {})",
compiler.stage, "rust-analyzer", &compiler.host.triple, target.triple
)
};
builder.info(&msg);
run_cargo(
builder,
cargo,
Expand Down Expand Up @@ -432,14 +460,18 @@ macro_rules! tool_check_step {
// NOTE: this doesn't enable lints for any other tools unless they explicitly add `#![warn(rustc::internal)]`
// See https://github.com/rust-lang/rust/pull/80573#issuecomment-754010776
cargo.rustflag("-Zunstable-options");

builder.info(&format!(
"Checking stage{} {} artifacts ({} -> {})",
builder.top_stage,
stringify!($name).to_lowercase(),
&compiler.host.triple,
target.triple
));
let msg = if compiler.host == target {
format!("Checking stage{} {} artifacts ({target})", builder.top_stage, stringify!($name).to_lowercase())
} else {
format!(
"Checking stage{} {} artifacts ({} -> {})",
builder.top_stage,
stringify!($name).to_lowercase(),
&compiler.host.triple,
target.triple
)
};
builder.info(&msg);
run_cargo(
builder,
cargo,
Expand Down