Skip to content

Commit 8d4d050

Browse files
committed
Update Mode::ToolStd comment
1 parent 4017638 commit 8d4d050

File tree

1 file changed

+7
-2
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+7
-2
lines changed

src/bootstrap/src/core/build_steps/check.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,15 @@ fn prepare_compiler_for_check(
251251
match mode {
252252
Mode::ToolBootstrap => builder.compiler(0, host),
253253
Mode::ToolStd => {
254-
// A small number of tools rely on in-tree standard
255-
// library crates (e.g. compiletest needs libtest).
254+
// These tools require the local standard library to be checked
256255
let build_compiler = builder.compiler(builder.top_stage, host);
256+
257+
// We need to build the host stdlib to check the tool itself.
258+
// We need to build the target stdlib so that the tool can link to it.
257259
builder.std(build_compiler, host);
260+
// We could only check this library in theory, but `check::Std` doesn't copy rmetas
261+
// into `build_compiler`'s sysroot to avoid clashes with `.rlibs`, so we build it
262+
// instead.
258263
builder.std(build_compiler, target);
259264
build_compiler
260265
}

0 commit comments

Comments
 (0)