File tree 1 file changed +2
-11
lines changed
src/bootstrap/src/core/build_steps
1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -650,16 +650,7 @@ impl Step for Rustdoc {
650
650
}
651
651
}
652
652
653
- let build_compiler = if builder. download_rustc ( ) && target_compiler. stage == 1 {
654
- // We already have the stage 1 compiler, we don't need to cut the stage.
655
- builder. compiler ( target_compiler. stage , builder. config . build )
656
- } else {
657
- // Similar to `compile::Assemble`, build with the previous stage's compiler. Otherwise
658
- // we'd have stageN/bin/rustc and stageN/bin/rustdoc be effectively different stage
659
- // compilers, which isn't what we want. Rustdoc should be linked in the same way as the
660
- // rustc compiler it's paired with, so it must be built with the previous stage compiler.
661
- builder. compiler ( target_compiler. stage - 1 , builder. config . build )
662
- } ;
653
+ let build_compiler = get_tool_rustc_compiler ( builder, target_compiler) ;
663
654
664
655
// When using `download-rustc` and a stage0 build_compiler, copying rustc doesn't actually
665
656
// build stage0 libstd (because the libstd in sysroot has the wrong ABI). Explicitly build
@@ -682,7 +673,7 @@ impl Step for Rustdoc {
682
673
// NOTE: Never modify the rustflags here, it breaks the build cache for other tools!
683
674
let mut cargo = prepare_tool_cargo (
684
675
builder,
685
- build_compiler ,
676
+ target_compiler ,
686
677
Mode :: ToolRustc ,
687
678
target,
688
679
Kind :: Build ,
You can’t perform that action at this time.
0 commit comments