File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ impl Step for Std {
150150 trace ! ( force_recompile) ;
151151
152152 run. builder . ensure ( Std {
153- build_compiler : run. builder . compiler ( run. builder . top_stage , run. build_triple ( ) ) ,
153+ build_compiler : run. builder . compiler_for_std ( run. builder . top_stage , run. target ) ,
154154 target : run. target ,
155155 crates,
156156 force_recompile,
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ impl Step for JsonDocs {
115115
116116 fn make_run ( run : RunConfig < ' _ > ) {
117117 run. builder . ensure ( JsonDocs {
118- build_compiler : run. builder . compiler ( run. builder . top_stage , run. builder . host_target ) ,
118+ build_compiler : run. builder . compiler_for_std ( run. builder . top_stage , run. target ) ,
119119 target : run. target ,
120120 } ) ;
121121 }
Original file line number Diff line number Diff line change @@ -616,7 +616,9 @@ impl Step for Std {
616616 return ;
617617 }
618618 run. builder . ensure ( Std {
619- build_compiler : run. builder . compiler ( run. builder . top_stage , run. builder . host_target ) ,
619+ build_compiler : run
620+ . builder
621+ . compiler_for_std ( run. builder . top_stage , run. builder . host_target ) ,
620622 target : run. target ,
621623 format : if run. builder . config . cmd . json ( ) {
622624 DocumentationFormat :: Json
Original file line number Diff line number Diff line change @@ -1360,6 +1360,14 @@ impl<'a> Builder<'a> {
13601360 self . ensure ( compile:: Assemble { target_compiler : Compiler :: new ( stage, host) } )
13611361 }
13621362
1363+ pub fn compiler_for_std ( & self , stage : u32 , target : TargetSelection ) -> Compiler {
1364+ if compile:: Std :: should_be_uplifted_from_stage_1 ( self , stage, target) {
1365+ self . compiler ( 1 , self . host_target )
1366+ } else {
1367+ self . compiler ( stage, self . host_target )
1368+ }
1369+ }
1370+
13631371 /// Similar to `compiler`, except handles the full-bootstrap option to
13641372 /// silently use the stage1 compiler instead of a stage2 compiler if one is
13651373 /// requested.
You can’t perform that action at this time.
0 commit comments