diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-07-03 18:28:00 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-07-06 17:25:19 +0200 |
| commit | 8d4d0502bda4910d25261f34e6fc22e2e5b829e3 (patch) | |
| tree | d822abcf7f33f894d9a9fee058b7d11c4395ad5f | |
| parent | 40176388d2c79d4ae268f683b9503b39deb565aa (diff) | |
| download | rust-8d4d0502bda4910d25261f34e6fc22e2e5b829e3.tar.gz rust-8d4d0502bda4910d25261f34e6fc22e2e5b829e3.zip | |
Update `Mode::ToolStd` comment
| -rw-r--r-- | src/bootstrap/src/core/build_steps/check.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bootstrap/src/core/build_steps/check.rs b/src/bootstrap/src/core/build_steps/check.rs index 28644ecc340..555a02ac587 100644 --- a/src/bootstrap/src/core/build_steps/check.rs +++ b/src/bootstrap/src/core/build_steps/check.rs @@ -251,10 +251,15 @@ fn prepare_compiler_for_check( match mode { Mode::ToolBootstrap => builder.compiler(0, host), Mode::ToolStd => { - // A small number of tools rely on in-tree standard - // library crates (e.g. compiletest needs libtest). + // These tools require the local standard library to be checked let build_compiler = builder.compiler(builder.top_stage, host); + + // We need to build the host stdlib to check the tool itself. + // We need to build the target stdlib so that the tool can link to it. builder.std(build_compiler, host); + // We could only check this library in theory, but `check::Std` doesn't copy rmetas + // into `build_compiler`'s sysroot to avoid clashes with `.rlibs`, so we build it + // instead. builder.std(build_compiler, target); build_compiler } |
