@@ -765,7 +765,7 @@ impl Step for Rustdoc {
765765 extra_features. push ( "jemalloc" . to_string ( ) ) ;
766766 }
767767
768- let compilers = RustcPrivateCompilers :: from_link_compiler ( builder, target_compiler) ;
768+ let compilers = RustcPrivateCompilers :: from_target_compiler ( builder, target_compiler) ;
769769 let tool_path = builder
770770 . ensure ( ToolBuild {
771771 build_compiler : compilers. build_compiler ,
@@ -1133,7 +1133,7 @@ impl Step for RustAnalyzerProcMacroSrv {
11331133
11341134 // Copy `rust-analyzer-proc-macro-srv` to `<sysroot>/libexec/`
11351135 // 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" ) ;
11371137 t ! ( fs:: create_dir_all( & libexec_path) ) ;
11381138 builder. copy_link (
11391139 & tool_result. tool_path ,
@@ -1294,20 +1294,20 @@ impl Step for LibcxxVersionTool {
12941294/// that depends on compiler internals (`rustc_private`).
12951295/// Their compilation looks like this:
12961296///
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
12981298/// - These .rlibs are copied into the sysroot of `build_compiler`
12991299/// - `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 `
13011301///
13021302/// Eventually, this could also be used for .rmetas and check builds, but so far we only deal with
13031303/// normal builds here.
13041304#[ derive( Copy , Clone , Debug , Hash , PartialEq , Eq ) ]
13051305pub struct RustcPrivateCompilers {
1306- /// Compiler that builds the tool and that builds `link_compiler `.
1306+ /// Compiler that builds the tool and that builds `target_compiler `.
13071307 build_compiler : Compiler ,
13081308 /// Compiler to which .rlib artifacts the tool links to.
13091309 /// The host target of this compiler corresponds to the target of the tool.
1310- link_compiler : Compiler ,
1310+ target_compiler : Compiler ,
13111311}
13121312
13131313impl RustcPrivateCompilers {
@@ -1317,14 +1317,17 @@ impl RustcPrivateCompilers {
13171317 let build_compiler = Self :: build_compiler_from_stage ( builder, stage) ;
13181318
13191319 // 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) ;
13221322
1323- Self { build_compiler, link_compiler }
1323+ Self { build_compiler, target_compiler }
13241324 }
13251325
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 }
13281331 }
13291332
13301333 /// Create rustc tool compilers from the build compiler.
@@ -1333,15 +1336,15 @@ impl RustcPrivateCompilers {
13331336 build_compiler : Compiler ,
13341337 target : TargetSelection ,
13351338 ) -> 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 }
13381341 }
13391342
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 {
13421345 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 ,
13451348 }
13461349 }
13471350
@@ -1360,13 +1363,13 @@ impl RustcPrivateCompilers {
13601363 self . build_compiler
13611364 }
13621365
1363- pub fn link_compiler ( & self ) -> Compiler {
1364- self . link_compiler
1366+ pub fn target_compiler ( & self ) -> Compiler {
1367+ self . target_compiler
13651368 }
13661369
13671370 /// Target of the tool being compiled
13681371 pub fn target ( & self ) -> TargetSelection {
1369- self . link_compiler . host
1372+ self . target_compiler . host
13701373 }
13711374}
13721375
@@ -1494,7 +1497,7 @@ fn build_extended_rustc_tool(
14941497 artifact_kind : ToolArtifactKind :: Binary ,
14951498 } ) ;
14961499
1497- let target_compiler = compilers. link_compiler ;
1500+ let target_compiler = compilers. target_compiler ;
14981501 if let Some ( add_bins_to_sysroot) = add_bins_to_sysroot
14991502 && !add_bins_to_sysroot. is_empty ( )
15001503 {
0 commit comments