@@ -37,11 +37,12 @@ use crate::{
37
37
debug, trace,
38
38
} ;
39
39
40
- /// Build a standard library for the given `target` using the given `compiler `.
40
+ /// Build a standard library for the given `target` using the given `build_compiler `.
41
41
#[ derive( Debug , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
42
42
pub struct Std {
43
43
pub target : TargetSelection ,
44
- pub compiler : Compiler ,
44
+ /// Compiler that builds the standard library.
45
+ pub build_compiler : Compiler ,
45
46
/// Whether to build only a subset of crates in the standard library.
46
47
///
47
48
/// This shouldn't be used from other steps; see the comment on [`Rustc`].
@@ -54,10 +55,10 @@ pub struct Std {
54
55
}
55
56
56
57
impl Std {
57
- pub fn new ( compiler : Compiler , target : TargetSelection ) -> Self {
58
+ pub fn new ( build_compiler : Compiler , target : TargetSelection ) -> Self {
58
59
Self {
59
60
target,
60
- compiler ,
61
+ build_compiler ,
61
62
crates : Default :: default ( ) ,
62
63
force_recompile : false ,
63
64
extra_rust_args : & [ ] ,
@@ -121,7 +122,7 @@ impl Step for Std {
121
122
trace ! ( force_recompile) ;
122
123
123
124
run. builder . ensure ( Std {
124
- compiler : run. builder . compiler ( run. builder . top_stage , run. build_triple ( ) ) ,
125
+ build_compiler : run. builder . compiler ( run. builder . top_stage , run. build_triple ( ) ) ,
125
126
target : run. target ,
126
127
crates,
127
128
force_recompile,
@@ -152,8 +153,8 @@ impl Step for Std {
152
153
let target = self . target ;
153
154
154
155
// We already have std ready to be used for stage 0.
155
- if self . compiler . stage == 0 {
156
- let compiler = self . compiler ;
156
+ if self . build_compiler . stage == 0 {
157
+ let compiler = self . build_compiler ;
157
158
builder. ensure ( StdLink :: from_std ( self , compiler) ) ;
158
159
159
160
return ;
@@ -162,9 +163,10 @@ impl Step for Std {
162
163
let build_compiler = if builder. download_rustc ( ) && self . force_recompile {
163
164
// When there are changes in the library tree with CI-rustc, we want to build
164
165
// the stageN library and that requires using stageN-1 compiler.
165
- builder. compiler ( self . compiler . stage . saturating_sub ( 1 ) , builder. config . host_target )
166
+ builder
167
+ . compiler ( self . build_compiler . stage . saturating_sub ( 1 ) , builder. config . host_target )
166
168
} else {
167
- self . compiler
169
+ self . build_compiler
168
170
} ;
169
171
170
172
// When using `download-rustc`, we already have artifacts for the host available. Don't
@@ -313,7 +315,7 @@ impl Step for Std {
313
315
}
314
316
315
317
fn metadata ( & self ) -> Option < StepMetadata > {
316
- Some ( StepMetadata :: build ( "std" , self . target ) . built_by ( self . compiler ) )
318
+ Some ( StepMetadata :: build ( "std" , self . target ) . built_by ( self . build_compiler ) )
317
319
}
318
320
}
319
321
@@ -694,7 +696,7 @@ impl StdLink {
694
696
pub fn from_std ( std : Std , host_compiler : Compiler ) -> Self {
695
697
Self {
696
698
compiler : host_compiler,
697
- target_compiler : std. compiler ,
699
+ target_compiler : std. build_compiler ,
698
700
target : std. target ,
699
701
crates : std. crates ,
700
702
force_recompile : std. force_recompile ,
0 commit comments