@@ -765,7 +765,7 @@ impl Step for Rustdoc {
765
765
extra_features. push ( "jemalloc" . to_string ( ) ) ;
766
766
}
767
767
768
- let compilers = RustcPrivateCompilers :: from_link_compiler ( builder, target_compiler) ;
768
+ let compilers = RustcPrivateCompilers :: from_target_compiler ( builder, target_compiler) ;
769
769
let tool_path = builder
770
770
. ensure ( ToolBuild {
771
771
build_compiler : compilers. build_compiler ,
@@ -1133,7 +1133,7 @@ impl Step for RustAnalyzerProcMacroSrv {
1133
1133
1134
1134
// Copy `rust-analyzer-proc-macro-srv` to `<sysroot>/libexec/`
1135
1135
// so that r-a can use it.
1136
- let libexec_path = builder. sysroot ( self . compilers . link_compiler ) . join ( "libexec" ) ;
1136
+ let libexec_path = builder. sysroot ( self . compilers . target_compiler ) . join ( "libexec" ) ;
1137
1137
t ! ( fs:: create_dir_all( & libexec_path) ) ;
1138
1138
builder. copy_link (
1139
1139
& tool_result. tool_path ,
@@ -1294,20 +1294,20 @@ impl Step for LibcxxVersionTool {
1294
1294
/// that depends on compiler internals (`rustc_private`).
1295
1295
/// Their compilation looks like this:
1296
1296
///
1297
- /// - `build_compiler` (stage N-1) builds `link_compiler ` (stage N) to produce .rlibs
1297
+ /// - `build_compiler` (stage N-1) builds `target_compiler ` (stage N) to produce .rlibs
1298
1298
/// - These .rlibs are copied into the sysroot of `build_compiler`
1299
1299
/// - `build_compiler` (stage N-1) builds `<tool>` (stage N)
1300
- /// - `<tool>` links to .rlibs from `link_compiler `
1300
+ /// - `<tool>` links to .rlibs from `target_compiler `
1301
1301
///
1302
1302
/// Eventually, this could also be used for .rmetas and check builds, but so far we only deal with
1303
1303
/// normal builds here.
1304
1304
#[ derive( Copy , Clone , Debug , Hash , PartialEq , Eq ) ]
1305
1305
pub struct RustcPrivateCompilers {
1306
- /// Compiler that builds the tool and that builds `link_compiler `.
1306
+ /// Compiler that builds the tool and that builds `target_compiler `.
1307
1307
build_compiler : Compiler ,
1308
1308
/// Compiler to which .rlib artifacts the tool links to.
1309
1309
/// The host target of this compiler corresponds to the target of the tool.
1310
- link_compiler : Compiler ,
1310
+ target_compiler : Compiler ,
1311
1311
}
1312
1312
1313
1313
impl RustcPrivateCompilers {
@@ -1317,14 +1317,17 @@ impl RustcPrivateCompilers {
1317
1317
let build_compiler = Self :: build_compiler_from_stage ( builder, stage) ;
1318
1318
1319
1319
// This is the compiler we'll link to
1320
- // FIXME: make 100% sure that `link_compiler ` was indeed built with `build_compiler`...
1321
- let link_compiler = builder. compiler ( build_compiler. stage + 1 , target) ;
1320
+ // FIXME: make 100% sure that `target_compiler ` was indeed built with `build_compiler`...
1321
+ let target_compiler = builder. compiler ( build_compiler. stage + 1 , target) ;
1322
1322
1323
- Self { build_compiler, link_compiler }
1323
+ Self { build_compiler, target_compiler }
1324
1324
}
1325
1325
1326
- pub fn from_build_and_link_compiler ( build_compiler : Compiler , link_compiler : Compiler ) -> Self {
1327
- Self { build_compiler, link_compiler }
1326
+ pub fn from_build_and_target_compiler (
1327
+ build_compiler : Compiler ,
1328
+ target_compiler : Compiler ,
1329
+ ) -> Self {
1330
+ Self { build_compiler, target_compiler }
1328
1331
}
1329
1332
1330
1333
/// Create rustc tool compilers from the build compiler.
@@ -1333,15 +1336,15 @@ impl RustcPrivateCompilers {
1333
1336
build_compiler : Compiler ,
1334
1337
target : TargetSelection ,
1335
1338
) -> Self {
1336
- let link_compiler = builder. compiler ( build_compiler. stage + 1 , target) ;
1337
- Self { build_compiler, link_compiler }
1339
+ let target_compiler = builder. compiler ( build_compiler. stage + 1 , target) ;
1340
+ Self { build_compiler, target_compiler }
1338
1341
}
1339
1342
1340
- /// Create rustc tool compilers from the link compiler.
1341
- pub fn from_link_compiler ( builder : & Builder < ' _ > , link_compiler : Compiler ) -> Self {
1343
+ /// Create rustc tool compilers from the target compiler.
1344
+ pub fn from_target_compiler ( builder : & Builder < ' _ > , target_compiler : Compiler ) -> Self {
1342
1345
Self {
1343
- build_compiler : Self :: build_compiler_from_stage ( builder, link_compiler . stage ) ,
1344
- link_compiler ,
1346
+ build_compiler : Self :: build_compiler_from_stage ( builder, target_compiler . stage ) ,
1347
+ target_compiler ,
1345
1348
}
1346
1349
}
1347
1350
@@ -1360,13 +1363,13 @@ impl RustcPrivateCompilers {
1360
1363
self . build_compiler
1361
1364
}
1362
1365
1363
- pub fn link_compiler ( & self ) -> Compiler {
1364
- self . link_compiler
1366
+ pub fn target_compiler ( & self ) -> Compiler {
1367
+ self . target_compiler
1365
1368
}
1366
1369
1367
1370
/// Target of the tool being compiled
1368
1371
pub fn target ( & self ) -> TargetSelection {
1369
- self . link_compiler . host
1372
+ self . target_compiler . host
1370
1373
}
1371
1374
}
1372
1375
@@ -1494,7 +1497,7 @@ fn build_extended_rustc_tool(
1494
1497
artifact_kind : ToolArtifactKind :: Binary ,
1495
1498
} ) ;
1496
1499
1497
- let target_compiler = compilers. link_compiler ;
1500
+ let target_compiler = compilers. target_compiler ;
1498
1501
if let Some ( add_bins_to_sysroot) = add_bins_to_sysroot
1499
1502
&& !add_bins_to_sysroot. is_empty ( )
1500
1503
{
0 commit comments