Skip to content

Commit f531fec

Browse files
committed
Give more helpful progress messages in Assemble
Before (download-rustc): ``` # no output ``` After (download-rustc): ``` Creating a sysroot for stage2 compiler (use `rustup toolchain link 'name' build/host/stage2`) ``` Before (compiling from source): ``` Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu) Assembling stage1 compiler Build stage1 library artifacts (x86_64-unknown-linux-gnu -> i686-unknown-linux-gnu) Building compiler artifacts (stage0:x86_64-unknown-linux-gnu -> stage1:i686-unknown-linux-gnu) Assembling stage1 compiler (i686-unknown-linux-gnu) ``` After (compiling from source): ``` Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu) Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`) Build stage1 library artifacts (x86_64-unknown-linux-gnu) Building compiler artifacts (stage0:x86_64-unknown-linux-gnu -> stage1:i686-unknown-linux-gnu) Creating a sysroot for stage1 compiler (i686-unknown-linux-gnu) (use `rustup toolchain link 'name' build/i686-unknown-linux-gnu/stage1`) ```
1 parent 9610dfe commit f531fec

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/bootstrap/compile.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,10 @@ impl Step for Assemble {
14151415
// Ensure that `libLLVM.so` ends up in the newly created target directory,
14161416
// so that tools using `rustc_private` can use it.
14171417
dist::maybe_install_llvm_target(builder, target_compiler.host, &sysroot);
1418+
// Lower stages use `ci-rustc-sysroot`, not stageN
1419+
if target_compiler.stage == builder.top_stage {
1420+
builder.info(&format!("Creating a sysroot for stage{stage} compiler (use `rustup toolchain link 'name' build/host/stage{stage}`)", stage=target_compiler.stage));
1421+
}
14181422
return target_compiler;
14191423
}
14201424

@@ -1452,11 +1456,18 @@ impl Step for Assemble {
14521456

14531457
let stage = target_compiler.stage;
14541458
let host = target_compiler.host;
1455-
let msg = if build_compiler.host == host {
1456-
format!("Assembling stage{} compiler", stage)
1459+
let (host_info, dir_name) = if build_compiler.host == host {
1460+
("".into(), "host".into())
14571461
} else {
1458-
format!("Assembling stage{} compiler ({})", stage, host)
1462+
(format!(" ({host})"), host.to_string())
14591463
};
1464+
// NOTE: "Creating a sysroot" is somewhat inconsistent with our internal terminology, since
1465+
// sysroots can temporarily be empty until we put the compiler inside. However,
1466+
// `ensure(Sysroot)` isn't really something that's user facing, so there shouldn't be any
1467+
// ambiguity.
1468+
let msg = format!(
1469+
"Creating a sysroot for stage{stage} compiler{host_info} (use `rustup toolchain link 'name' build/{dir_name}/stage{stage}`)"
1470+
);
14601471
builder.info(&msg);
14611472

14621473
// Link in all dylibs to the libdir

0 commit comments

Comments
 (0)