@@ -1371,7 +1371,7 @@ impl Step for RustAnalyzer {
13711371
13721372#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
13731373pub struct Clippy {
1374- pub build_compiler : Compiler ,
1374+ pub compilers : RustcPrivateCompilers ,
13751375 pub target : TargetSelection ,
13761376}
13771377
@@ -1387,25 +1387,19 @@ impl Step for Clippy {
13871387
13881388 fn make_run ( run : RunConfig < ' _ > ) {
13891389 run. builder . ensure ( Clippy {
1390- build_compiler : run. builder . compiler_for (
1391- run. builder . top_stage ,
1392- run. builder . config . host_target ,
1393- run. target ,
1394- ) ,
1390+ compilers : RustcPrivateCompilers :: new ( run. builder , run. builder . top_stage , run. target ) ,
13951391 target : run. target ,
13961392 } ) ;
13971393 }
13981394
13991395 fn run ( self , builder : & Builder < ' _ > ) -> Option < GeneratedTarball > {
14001396 let target = self . target ;
1401- let compilers =
1402- RustcPrivateCompilers :: from_build_compiler ( builder, self . build_compiler , target) ;
14031397
14041398 // Prepare the image directory
14051399 // We expect clippy to build, because we've exited this step above if tool
14061400 // state for clippy isn't testing.
1407- let clippy = builder. ensure ( tool:: Clippy :: from_compilers ( compilers) ) ;
1408- let cargoclippy = builder. ensure ( tool:: CargoClippy :: from_compilers ( compilers) ) ;
1401+ let clippy = builder. ensure ( tool:: Clippy :: from_compilers ( self . compilers ) ) ;
1402+ let cargoclippy = builder. ensure ( tool:: CargoClippy :: from_compilers ( self . compilers ) ) ;
14091403
14101404 let mut tarball = Tarball :: new ( builder, "clippy" , & target. triple ) ;
14111405 tarball. set_overlay ( OverlayKind :: Clippy ) ;
@@ -1415,6 +1409,10 @@ impl Step for Clippy {
14151409 tarball. add_legal_and_readme_to ( "share/doc/clippy" ) ;
14161410 Some ( tarball. generate ( ) )
14171411 }
1412+
1413+ fn metadata ( & self ) -> Option < StepMetadata > {
1414+ Some ( StepMetadata :: dist ( "clippy" , self . target ) . built_by ( self . compilers . build_compiler ( ) ) )
1415+ }
14181416}
14191417
14201418#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
@@ -1659,14 +1657,17 @@ impl Step for Extended {
16591657 tarballs. push ( builder. ensure ( Mingw { target } ) . expect ( "missing mingw" ) ) ;
16601658 }
16611659
1660+ let rustc_private_compilers =
1661+ RustcPrivateCompilers :: from_build_compiler ( builder, compiler, target) ;
1662+
16621663 add_component ! ( "rust-docs" => Docs { host: target } ) ;
16631664 // Std stage N is documented with compiler stage N
16641665 add_component ! ( "rust-json-docs" => JsonDocs { build_compiler: target_compiler, target } ) ;
16651666 add_component ! ( "cargo" => Cargo { build_compiler: compiler, target } ) ;
16661667 add_component ! ( "rustfmt" => Rustfmt { build_compiler: compiler, target } ) ;
1667- add_component ! ( "rust-analyzer" => RustAnalyzer { compilers: RustcPrivateCompilers :: from_build_compiler ( builder , compiler , target ) , target } ) ;
1668+ add_component ! ( "rust-analyzer" => RustAnalyzer { compilers: rustc_private_compilers , target } ) ;
16681669 add_component ! ( "llvm-components" => LlvmTools { target } ) ;
1669- add_component ! ( "clippy" => Clippy { build_compiler : compiler , target } ) ;
1670+ add_component ! ( "clippy" => Clippy { compilers : rustc_private_compilers , target } ) ;
16701671 add_component ! ( "miri" => Miri { build_compiler: compiler, target } ) ;
16711672 add_component ! ( "analysis" => Analysis { build_compiler: compiler, target } ) ;
16721673 add_component ! ( "rustc-codegen-cranelift" => CraneliftCodegenBackend {
0 commit comments