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;
@@ -306,15 +306,15 @@ impl Step for Rustc {
306306
307307#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
308308pub struct CodegenGcc {
309- compilers : RustcPrivateCompilers ,
309+ build_compiler : Compiler ,
310310 target : TargetSelection ,
311311 config : LintConfig ,
312312}
313313
314314impl CodegenGcc {
315315 fn new ( builder : & Builder < ' _ > , target : TargetSelection , config : LintConfig ) -> Self {
316316 Self {
317- compilers : RustcPrivateCompilers :: new ( builder, builder . top_stage , target ) ,
317+ build_compiler : prepare_compiler_for_check ( builder, target , Mode :: Codegen ) ,
318318 target,
319319 config,
320320 }
@@ -335,7 +335,7 @@ impl Step for CodegenGcc {
335335 }
336336
337337 fn run ( self , builder : & Builder < ' _ > ) -> Self :: Output {
338- let build_compiler = self . compilers . build_compiler ( ) ;
338+ let build_compiler = self . build_compiler ;
339339 let target = self . target ;
340340
341341 let cargo = prepare_tool_cargo (
@@ -367,10 +367,7 @@ impl Step for CodegenGcc {
367367 }
368368
369369 fn metadata ( & self ) -> Option < StepMetadata > {
370- Some (
371- StepMetadata :: clippy ( "rustc_codegen_gcc" , self . target )
372- . built_by ( self . compilers . build_compiler ( ) ) ,
373- )
370+ Some ( StepMetadata :: clippy ( "rustc_codegen_gcc" , self . target ) . built_by ( self . build_compiler ) )
374371 }
375372}
376373
0 commit comments