Skip to content

Commit 87bbdc4

Browse files
committed
wip
1 parent 2b66f46 commit 87bbdc4

File tree

1 file changed

+6
-1
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+6
-1
lines changed

Diff for: src/bootstrap/src/core/build_steps/tool.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ impl Step for ToolBuild {
8080

8181
match self.mode {
8282
Mode::ToolRustc => {
83-
let linked_against_compiler = compiler.with_stage(compiler.stage + 1);
83+
// Tools built using the stage1 compiler are linked against the stage2 compiler,
84+
// otherwise everything is stage2.
85+
let linked_against_compiler = match compiler.stage {
86+
0 => compiler.with_stage(1),
87+
1.. => compiler.with_stage(2),
88+
};
8489
// When building a tool that links against rustc,
8590
// we need the rustc to link against and its std to be present and ready in the syroot.
8691
builder.ensure(compile::Std::new(

0 commit comments

Comments
 (0)