1313//! (as usual) a massive undertaking/refactoring.
1414
1515use super :: compile:: { run_cargo, rustc_cargo, std_cargo} ;
16- use super :: tool:: { RustcPrivateCompilers , SourceType , prepare_tool_cargo} ;
16+ use super :: tool:: { SourceType , prepare_tool_cargo} ;
1717use crate :: builder:: { Builder , ShouldRun } ;
1818use crate :: core:: build_steps:: check:: prepare_compiler_for_check;
1919use crate :: core:: build_steps:: compile:: std_crates_for_run_make;
@@ -296,15 +296,15 @@ impl Step for Rustc {
296296
297297#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
298298pub struct CodegenGcc {
299- compilers : RustcPrivateCompilers ,
299+ build_compiler : Compiler ,
300300 target : TargetSelection ,
301301 config : LintConfig ,
302302}
303303
304304impl CodegenGcc {
305305 fn new ( builder : & Builder < ' _ > , target : TargetSelection , config : LintConfig ) -> Self {
306306 Self {
307- compilers : RustcPrivateCompilers :: new ( builder, builder . top_stage , target ) ,
307+ build_compiler : prepare_compiler_for_check ( builder, target , Mode :: Codegen ) ,
308308 target,
309309 config,
310310 }
@@ -325,7 +325,7 @@ impl Step for CodegenGcc {
325325 }
326326
327327 fn run ( self , builder : & Builder < ' _ > ) -> Self :: Output {
328- let build_compiler = self . compilers . build_compiler ( ) ;
328+ let build_compiler = self . build_compiler ;
329329 let target = self . target ;
330330
331331 let cargo = prepare_tool_cargo (
@@ -363,10 +363,7 @@ impl Step for CodegenGcc {
363363 }
364364
365365 fn metadata ( & self ) -> Option < StepMetadata > {
366- Some (
367- StepMetadata :: clippy ( "rustc_codegen_gcc" , self . target )
368- . built_by ( self . compilers . build_compiler ( ) ) ,
369- )
366+ Some ( StepMetadata :: clippy ( "rustc_codegen_gcc" , self . target ) . built_by ( self . build_compiler ) )
370367 }
371368}
372369
0 commit comments