@@ -1380,7 +1380,7 @@ impl Step for RustAnalyzer {
1380
1380
1381
1381
#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
1382
1382
pub struct Clippy {
1383
- pub build_compiler : Compiler ,
1383
+ pub compilers : RustcPrivateCompilers ,
1384
1384
pub target : TargetSelection ,
1385
1385
}
1386
1386
@@ -1396,25 +1396,19 @@ impl Step for Clippy {
1396
1396
1397
1397
fn make_run ( run : RunConfig < ' _ > ) {
1398
1398
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 ) ,
1404
1400
target : run. target ,
1405
1401
} ) ;
1406
1402
}
1407
1403
1408
1404
fn run ( self , builder : & Builder < ' _ > ) -> Option < GeneratedTarball > {
1409
1405
let target = self . target ;
1410
- let compilers =
1411
- RustcPrivateCompilers :: from_build_compiler ( builder, self . build_compiler , target) ;
1412
1406
1413
1407
// Prepare the image directory
1414
1408
// We expect clippy to build, because we've exited this step above if tool
1415
1409
// 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 ) ) ;
1418
1412
1419
1413
let mut tarball = Tarball :: new ( builder, "clippy" , & target. triple ) ;
1420
1414
tarball. set_overlay ( OverlayKind :: Clippy ) ;
@@ -1424,6 +1418,10 @@ impl Step for Clippy {
1424
1418
tarball. add_legal_and_readme_to ( "share/doc/clippy" ) ;
1425
1419
Some ( tarball. generate ( ) )
1426
1420
}
1421
+
1422
+ fn metadata ( & self ) -> Option < StepMetadata > {
1423
+ Some ( StepMetadata :: dist ( "clippy" , self . target ) . built_by ( self . compilers . build_compiler ( ) ) )
1424
+ }
1427
1425
}
1428
1426
1429
1427
#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
@@ -1668,14 +1666,17 @@ impl Step for Extended {
1668
1666
tarballs. push ( builder. ensure ( Mingw { target } ) . expect ( "missing mingw" ) ) ;
1669
1667
}
1670
1668
1669
+ let rustc_private_compilers =
1670
+ RustcPrivateCompilers :: from_build_compiler ( builder, compiler, target) ;
1671
+
1671
1672
add_component ! ( "rust-docs" => Docs { host: target } ) ;
1672
1673
// Std stage N is documented with compiler stage N
1673
1674
add_component ! ( "rust-json-docs" => JsonDocs { build_compiler: target_compiler, target } ) ;
1674
1675
add_component ! ( "cargo" => Cargo { build_compiler: compiler, target } ) ;
1675
1676
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 } ) ;
1677
1678
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 } ) ;
1679
1680
add_component ! ( "miri" => Miri { build_compiler: compiler, target } ) ;
1680
1681
add_component ! ( "analysis" => Analysis { build_compiler: compiler, target } ) ;
1681
1682
add_component ! ( "rustc-codegen-cranelift" => CraneliftCodegenBackend {
0 commit comments