@@ -1599,10 +1599,10 @@ impl Step for Rustfmt {
1599
1599
}
1600
1600
}
1601
1601
1602
+ /// Extended archive that contains the compiler, standard library and a bunch of tools.
1602
1603
#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
1603
1604
pub struct Extended {
1604
- stage : u32 ,
1605
- host : TargetSelection ,
1605
+ build_compiler : Compiler ,
1606
1606
target : TargetSelection ,
1607
1607
}
1608
1608
@@ -1618,19 +1618,17 @@ impl Step for Extended {
1618
1618
1619
1619
fn make_run ( run : RunConfig < ' _ > ) {
1620
1620
run. builder . ensure ( Extended {
1621
- stage : run. builder . top_stage ,
1622
- host : run. builder . config . host_target ,
1621
+ build_compiler : run
1622
+ . builder
1623
+ . compiler ( run. builder . top_stage - 1 , run. builder . host_target ) ,
1623
1624
target : run. target ,
1624
1625
} ) ;
1625
1626
}
1626
1627
1627
1628
/// Creates a combined installer for the specified target in the provided stage.
1628
1629
fn run ( self , builder : & Builder < ' _ > ) {
1629
1630
let target = self . target ;
1630
- let stage = self . stage ;
1631
- let compiler = builder. compiler_for ( self . stage , self . host , self . target ) ;
1632
-
1633
- builder. info ( & format ! ( "Dist extended stage{} ({})" , compiler. stage, target) ) ;
1631
+ builder. info ( & format ! ( "Dist extended stage{} ({target})" , builder. top_stage) ) ;
1634
1632
1635
1633
let mut tarballs = Vec :: new ( ) ;
1636
1634
let mut built_tools = HashSet :: new ( ) ;
@@ -1643,38 +1641,38 @@ impl Step for Extended {
1643
1641
} ;
1644
1642
}
1645
1643
1646
- let target_compiler = builder. compiler ( stage, target) ;
1644
+ let rustc_private_compilers =
1645
+ RustcPrivateCompilers :: from_build_compiler ( builder, self . build_compiler , target) ;
1646
+ let build_compiler = rustc_private_compilers. build_compiler ( ) ;
1647
+ let target_compiler = rustc_private_compilers. target_compiler ( ) ;
1648
+
1647
1649
// When rust-std package split from rustc, we needed to ensure that during
1648
1650
// upgrades rustc was upgraded before rust-std. To avoid rustc clobbering
1649
1651
// the std files during uninstall. To do this ensure that rustc comes
1650
1652
// before rust-std in the list below.
1651
1653
tarballs. push ( builder. ensure ( Rustc { target_compiler } ) ) ;
1652
- tarballs
1653
- . push ( builder. ensure ( Std { build_compiler : compiler, target } ) . expect ( "missing std" ) ) ;
1654
+ tarballs. push ( builder. ensure ( Std { build_compiler, target } ) . expect ( "missing std" ) ) ;
1654
1655
1655
1656
if target. is_windows_gnu ( ) {
1656
1657
tarballs. push ( builder. ensure ( Mingw { target } ) . expect ( "missing mingw" ) ) ;
1657
1658
}
1658
1659
1659
- let rustc_private_compilers =
1660
- RustcPrivateCompilers :: from_build_compiler ( builder, compiler, target) ;
1661
-
1662
1660
add_component ! ( "rust-docs" => Docs { host: target } ) ;
1663
1661
// Std stage N is documented with compiler stage N
1664
1662
add_component ! ( "rust-json-docs" => JsonDocs { build_compiler: target_compiler, target } ) ;
1665
- add_component ! ( "cargo" => Cargo { build_compiler: compiler , target } ) ;
1663
+ add_component ! ( "cargo" => Cargo { build_compiler, target } ) ;
1666
1664
add_component ! ( "rustfmt" => Rustfmt { compilers: rustc_private_compilers, target } ) ;
1667
1665
add_component ! ( "rust-analyzer" => RustAnalyzer { compilers: rustc_private_compilers, target } ) ;
1668
1666
add_component ! ( "llvm-components" => LlvmTools { target } ) ;
1669
1667
add_component ! ( "clippy" => Clippy { compilers: rustc_private_compilers, target } ) ;
1670
1668
add_component ! ( "miri" => Miri { compilers: rustc_private_compilers, target } ) ;
1671
- add_component ! ( "analysis" => Analysis { build_compiler: compiler , target } ) ;
1669
+ add_component ! ( "analysis" => Analysis { build_compiler, target } ) ;
1672
1670
add_component ! ( "rustc-codegen-cranelift" => CraneliftCodegenBackend {
1673
1671
compilers: rustc_private_compilers,
1674
1672
target
1675
1673
} ) ;
1676
1674
add_component ! ( "llvm-bitcode-linker" => LlvmBitcodeLinker {
1677
- build_compiler: compiler ,
1675
+ build_compiler,
1678
1676
target
1679
1677
} ) ;
1680
1678
@@ -2140,6 +2138,10 @@ impl Step for Extended {
2140
2138
}
2141
2139
}
2142
2140
}
2141
+
2142
+ fn metadata ( & self ) -> Option < StepMetadata > {
2143
+ Some ( StepMetadata :: dist ( "extended" , self . target ) . built_by ( self . build_compiler ) )
2144
+ }
2143
2145
}
2144
2146
2145
2147
fn add_env (
0 commit comments