File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1102,6 +1102,8 @@ impl Step for Sysroot {
11021102 let host_dir = builder. out . join ( & compiler. host . triple ) ;
11031103 let sysroot = if compiler. stage == 0 {
11041104 host_dir. join ( "stage0-sysroot" )
1105+ } else if builder. download_rustc ( ) {
1106+ host_dir. join ( "ci-rustc-sysroot" )
11051107 } else {
11061108 host_dir. join ( format ! ( "stage{}" , compiler. stage) )
11071109 } ;
@@ -1115,7 +1117,7 @@ impl Step for Sysroot {
11151117 "Cross-compiling is not yet supported with `download-rustc`" ,
11161118 ) ;
11171119
1118- // #102002, cleanup stage1 and stage0-sysroot folders when using download-rustc
1120+ // #102002, cleanup stage1 and stage0-sysroot folders when using download-rustc so people don't use old versions of the toolchain by accident.
11191121 let _ = fs:: remove_dir_all ( host_dir. join ( "stage1" ) ) ;
11201122 let _ = fs:: remove_dir_all ( host_dir. join ( "stage0-sysroot" ) ) ;
11211123
Original file line number Diff line number Diff line change @@ -512,10 +512,8 @@ impl Step for Rustdoc {
512512 // Similar to `compile::Assemble`, build with the previous stage's compiler. Otherwise
513513 // we'd have stageN/bin/rustc and stageN/bin/rustdoc be effectively different stage
514514 // compilers, which isn't what we want. Rustdoc should be linked in the same way as the
515- // rustc compiler it's paired with, so it must be built with the previous stage compiler,
516- // if download_rustc is true, we will use the same target stage.
517- let target_stage = target_compiler. stage - if builder. download_rustc ( ) { 0 } else { 1 } ;
518- let build_compiler = builder. compiler ( target_stage, builder. config . build ) ;
515+ // rustc compiler it's paired with, so it must be built with the previous stage compiler.
516+ let build_compiler = builder. compiler ( target_compiler. stage - 1 , builder. config . build ) ;
519517
520518 // When using `download-rustc` and a stage0 build_compiler, copying rustc doesn't actually
521519 // build stage0 libstd (because the libstd in sysroot has the wrong ABI). Explicitly build
You can’t perform that action at this time.
0 commit comments