@@ -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 : & [ ] ,
@@ -120,7 +121,7 @@ impl Step for Std {
120
121
trace ! ( force_recompile) ;
121
122
122
123
run. builder . ensure ( Std {
123
- compiler : run. builder . compiler ( run. builder . top_stage , run. build_triple ( ) ) ,
124
+ build_compiler : run. builder . compiler ( run. builder . top_stage , run. build_triple ( ) ) ,
124
125
target : run. target ,
125
126
crates,
126
127
force_recompile,
@@ -138,8 +139,8 @@ impl Step for Std {
138
139
let target = self . target ;
139
140
140
141
// We already have std ready to be used for stage 0.
141
- if self . compiler . stage == 0 {
142
- let compiler = self . compiler ;
142
+ if self . build_compiler . stage == 0 {
143
+ let compiler = self . build_compiler ;
143
144
builder. ensure ( StdLink :: from_std ( self , compiler) ) ;
144
145
145
146
return ;
@@ -148,9 +149,10 @@ impl Step for Std {
148
149
let build_compiler = if builder. download_rustc ( ) && self . force_recompile {
149
150
// When there are changes in the library tree with CI-rustc, we want to build
150
151
// the stageN library and that requires using stageN-1 compiler.
151
- builder. compiler ( self . compiler . stage . saturating_sub ( 1 ) , builder. config . host_target )
152
+ builder
153
+ . compiler ( self . build_compiler . stage . saturating_sub ( 1 ) , builder. config . host_target )
152
154
} else {
153
- self . compiler
155
+ self . build_compiler
154
156
} ;
155
157
156
158
// When using `download-rustc`, we already have artifacts for the host available. Don't
@@ -299,7 +301,7 @@ impl Step for Std {
299
301
}
300
302
301
303
fn metadata ( & self ) -> Option < StepMetadata > {
302
- Some ( StepMetadata :: build ( "std" , self . target ) . built_by ( self . compiler ) )
304
+ Some ( StepMetadata :: build ( "std" , self . target ) . built_by ( self . build_compiler ) )
303
305
}
304
306
}
305
307
@@ -680,7 +682,7 @@ impl StdLink {
680
682
pub fn from_std ( std : Std , host_compiler : Compiler ) -> Self {
681
683
Self {
682
684
compiler : host_compiler,
683
- target_compiler : std. compiler ,
685
+ target_compiler : std. build_compiler ,
684
686
target : std. target ,
685
687
crates : std. crates ,
686
688
force_recompile : std. force_recompile ,
0 commit comments