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 {
150
150
trace ! ( force_recompile) ;
151
151
152
152
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 ) ,
154
154
target : run. target ,
155
155
crates,
156
156
force_recompile,
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ impl Step for JsonDocs {
115
115
116
116
fn make_run ( run : RunConfig < ' _ > ) {
117
117
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 ) ,
119
119
target : run. target ,
120
120
} ) ;
121
121
}
Original file line number Diff line number Diff line change @@ -616,7 +616,9 @@ impl Step for Std {
616
616
return ;
617
617
}
618
618
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 ) ,
620
622
target : run. target ,
621
623
format : if run. builder . config . cmd . json ( ) {
622
624
DocumentationFormat :: Json
Original file line number Diff line number Diff line change @@ -1360,6 +1360,14 @@ impl<'a> Builder<'a> {
1360
1360
self . ensure ( compile:: Assemble { target_compiler : Compiler :: new ( stage, host) } )
1361
1361
}
1362
1362
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
+
1363
1371
/// Similar to `compiler`, except handles the full-bootstrap option to
1364
1372
/// silently use the stage1 compiler instead of a stage2 compiler if one is
1365
1373
/// requested.
You can’t perform that action at this time.
0 commit comments