@@ -1380,7 +1380,7 @@ impl Step for RustAnalyzer {
13801380
13811381#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
13821382pub struct Clippy {
1383- pub build_compiler : Compiler ,
1383+ pub compilers : RustcPrivateCompilers ,
13841384 pub target : TargetSelection ,
13851385}
13861386
@@ -1396,25 +1396,19 @@ impl Step for Clippy {
13961396
13971397 fn make_run ( run : RunConfig < ' _ > ) {
13981398 run. builder . ensure ( Clippy {
1399- build_compiler : run. builder . compiler_for (
1400- run. builder . top_stage ,
1401- run. builder . config . host_target ,
1402- run. target ,
1403- ) ,
1399+ compilers : RustcPrivateCompilers :: new ( run. builder , run. builder . top_stage , run. target ) ,
14041400 target : run. target ,
14051401 } ) ;
14061402 }
14071403
14081404 fn run ( self , builder : & Builder < ' _ > ) -> Option < GeneratedTarball > {
14091405 let target = self . target ;
1410- let compilers =
1411- RustcPrivateCompilers :: from_build_compiler ( builder, self . build_compiler , target) ;
14121406
14131407 // Prepare the image directory
14141408 // We expect clippy to build, because we've exited this step above if tool
14151409 // state for clippy isn't testing.
1416- let clippy = builder. ensure ( tool:: Clippy :: from_compilers ( compilers) ) ;
1417- let cargoclippy = builder. ensure ( tool:: CargoClippy :: from_compilers ( compilers) ) ;
1410+ let clippy = builder. ensure ( tool:: Clippy :: from_compilers ( self . compilers ) ) ;
1411+ let cargoclippy = builder. ensure ( tool:: CargoClippy :: from_compilers ( self . compilers ) ) ;
14181412
14191413 let mut tarball = Tarball :: new ( builder, "clippy" , & target. triple ) ;
14201414 tarball. set_overlay ( OverlayKind :: Clippy ) ;
@@ -1424,6 +1418,10 @@ impl Step for Clippy {
14241418 tarball. add_legal_and_readme_to ( "share/doc/clippy" ) ;
14251419 Some ( tarball. generate ( ) )
14261420 }
1421+
1422+ fn metadata ( & self ) -> Option < StepMetadata > {
1423+ Some ( StepMetadata :: dist ( "clippy" , self . target ) . built_by ( self . compilers . build_compiler ( ) ) )
1424+ }
14271425}
14281426
14291427#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
@@ -1668,14 +1666,17 @@ impl Step for Extended {
16681666 tarballs. push ( builder. ensure ( Mingw { target } ) . expect ( "missing mingw" ) ) ;
16691667 }
16701668
1669+ let rustc_private_compilers =
1670+ RustcPrivateCompilers :: from_build_compiler ( builder, compiler, target) ;
1671+
16711672 add_component ! ( "rust-docs" => Docs { host: target } ) ;
16721673 // Std stage N is documented with compiler stage N
16731674 add_component ! ( "rust-json-docs" => JsonDocs { build_compiler: target_compiler, target } ) ;
16741675 add_component ! ( "cargo" => Cargo { build_compiler: compiler, target } ) ;
16751676 add_component ! ( "rustfmt" => Rustfmt { build_compiler: compiler, target } ) ;
1676- add_component ! ( "rust-analyzer" => RustAnalyzer { compilers: RustcPrivateCompilers :: from_build_compiler ( builder , compiler , target ) , target } ) ;
1677+ add_component ! ( "rust-analyzer" => RustAnalyzer { compilers: rustc_private_compilers , target } ) ;
16771678 add_component ! ( "llvm-components" => LlvmTools { target } ) ;
1678- add_component ! ( "clippy" => Clippy { build_compiler : compiler , target } ) ;
1679+ add_component ! ( "clippy" => Clippy { compilers : rustc_private_compilers , target } ) ;
16791680 add_component ! ( "miri" => Miri { build_compiler: compiler, target } ) ;
16801681 add_component ! ( "analysis" => Analysis { build_compiler: compiler, target } ) ;
16811682 add_component ! ( "rustc-codegen-cranelift" => CraneliftCodegenBackend {
0 commit comments