Skip to content

Give more helpful progress messages in Assemble #112477

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

Merged
merged 1 commit into from
Jun 11, 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
17 changes: 14 additions & 3 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,10 @@ impl Step for Assemble {
// Ensure that `libLLVM.so` ends up in the newly created target directory,
// so that tools using `rustc_private` can use it.
dist::maybe_install_llvm_target(builder, target_compiler.host, &sysroot);
// Lower stages use `ci-rustc-sysroot`, not stageN
if target_compiler.stage == builder.top_stage {
builder.info(&format!("Creating a sysroot for stage{stage} compiler (use `rustup toolchain link 'name' build/host/stage{stage}`)", stage=target_compiler.stage));
}
return target_compiler;
}

Expand Down Expand Up @@ -1452,11 +1456,18 @@ impl Step for Assemble {

let stage = target_compiler.stage;
let host = target_compiler.host;
let msg = if build_compiler.host == host {
format!("Assembling stage{} compiler", stage)
let (host_info, dir_name) = if build_compiler.host == host {
("".into(), "host".into())
} else {
format!("Assembling stage{} compiler ({})", stage, host)
(format!(" ({host})"), host.to_string())
};
// NOTE: "Creating a sysroot" is somewhat inconsistent with our internal terminology, since
// sysroots can temporarily be empty until we put the compiler inside. However,
// `ensure(Sysroot)` isn't really something that's user facing, so there shouldn't be any
// ambiguity.
let msg = format!(
"Creating a sysroot for stage{stage} compiler{host_info} (use `rustup toolchain link 'name' build/{dir_name}/stage{stage}`)"
);
builder.info(&msg);

// Link in all dylibs to the libdir
Expand Down