We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b66f46 commit 87bbdc4Copy full SHA for 87bbdc4
src/bootstrap/src/core/build_steps/tool.rs
@@ -80,7 +80,12 @@ impl Step for ToolBuild {
80
81
match self.mode {
82
Mode::ToolRustc => {
83
- let linked_against_compiler = compiler.with_stage(compiler.stage + 1);
+ // 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
+ };
89
// When building a tool that links against rustc,
90
// we need the rustc to link against and its std to be present and ready in the syroot.
91
builder.ensure(compile::Std::new(
0 commit comments