@@ -1474,7 +1474,7 @@ impl Step for Miri {
1474
1474
1475
1475
#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
1476
1476
pub struct CraneliftCodegenBackend {
1477
- pub build_compiler : Compiler ,
1477
+ pub compilers : RustcPrivateCompilers ,
1478
1478
pub target : TargetSelection ,
1479
1479
}
1480
1480
@@ -1498,11 +1498,7 @@ impl Step for CraneliftCodegenBackend {
1498
1498
1499
1499
fn make_run ( run : RunConfig < ' _ > ) {
1500
1500
run. builder . ensure ( CraneliftCodegenBackend {
1501
- build_compiler : run. builder . compiler_for (
1502
- run. builder . top_stage ,
1503
- run. builder . config . host_target ,
1504
- run. target ,
1505
- ) ,
1501
+ compilers : RustcPrivateCompilers :: new ( run. builder , run. builder . top_stage , run. target ) ,
1506
1502
target : run. target ,
1507
1503
} ) ;
1508
1504
}
@@ -1516,8 +1512,6 @@ impl Step for CraneliftCodegenBackend {
1516
1512
}
1517
1513
1518
1514
let target = self . target ;
1519
- let compilers =
1520
- RustcPrivateCompilers :: from_build_compiler ( builder, self . build_compiler , target) ;
1521
1515
if !target_supports_cranelift_backend ( target) {
1522
1516
builder. info ( "target not supported by rustc_codegen_cranelift. skipping" ) ;
1523
1517
return None ;
@@ -1528,6 +1522,7 @@ impl Step for CraneliftCodegenBackend {
1528
1522
tarball. is_preview ( true ) ;
1529
1523
tarball. add_legal_and_readme_to ( "share/doc/rustc_codegen_cranelift" ) ;
1530
1524
1525
+ let compilers = self . compilers ;
1531
1526
let stamp = builder. ensure ( compile:: CraneliftCodegenBackend { compilers } ) ;
1532
1527
1533
1528
if builder. config . dry_run ( ) {
@@ -1557,8 +1552,8 @@ impl Step for CraneliftCodegenBackend {
1557
1552
1558
1553
fn metadata ( & self ) -> Option < StepMetadata > {
1559
1554
Some (
1560
- StepMetadata :: dist ( "rustc_codegen_cranelift" , self . build_compiler . host )
1561
- . built_by ( self . build_compiler ) ,
1555
+ StepMetadata :: dist ( "rustc_codegen_cranelift" , self . target )
1556
+ . built_by ( self . compilers . build_compiler ( ) ) ,
1562
1557
)
1563
1558
}
1564
1559
}
@@ -1678,7 +1673,7 @@ impl Step for Extended {
1678
1673
add_component ! ( "miri" => Miri { compilers: rustc_private_compilers, target } ) ;
1679
1674
add_component ! ( "analysis" => Analysis { build_compiler: compiler, target } ) ;
1680
1675
add_component ! ( "rustc-codegen-cranelift" => CraneliftCodegenBackend {
1681
- build_compiler : compiler ,
1676
+ compilers : rustc_private_compilers ,
1682
1677
target
1683
1678
} ) ;
1684
1679
add_component ! ( "llvm-bitcode-linker" => LlvmBitcodeLinker {
0 commit comments