@@ -35,18 +35,6 @@ pub fn tmpdir(builder: &Builder<'_>) -> PathBuf {
3535 builder. out . join ( "tmp/dist" )
3636}
3737
38- fn missing_tool ( tool_name : & str , skip : bool ) {
39- if skip {
40- println ! ( "Unable to build {}, skipping dist" , tool_name)
41- } else {
42- let help = "note: not all tools are available on all nightlies\n help: see https://forge.rust-lang.org/infra/toolstate.html for more information" ;
43- panic ! (
44- "Unable to build submodule tool {} (use `missing-tools = true` to ignore this failure)\n {}" ,
45- tool_name, help
46- )
47- }
48- }
49-
5038fn should_build_extended_tool ( builder : & Builder < ' _ > , tool : & str ) -> bool {
5139 if !builder. config . extended {
5240 return false ;
@@ -1209,18 +1197,9 @@ impl Step for Miri {
12091197 let compiler = self . compiler ;
12101198 let target = self . target ;
12111199
1212- let miri = builder
1213- . ensure ( tool:: Miri { compiler, target, extra_features : Vec :: new ( ) } )
1214- . or_else ( || {
1215- missing_tool ( "miri" , builder. build . config . missing_tools ) ;
1216- None
1217- } ) ?;
1218- let cargomiri = builder
1219- . ensure ( tool:: CargoMiri { compiler, target, extra_features : Vec :: new ( ) } )
1220- . or_else ( || {
1221- missing_tool ( "cargo miri" , builder. build . config . missing_tools ) ;
1222- None
1223- } ) ?;
1200+ let miri = builder. ensure ( tool:: Miri { compiler, target, extra_features : Vec :: new ( ) } ) ?;
1201+ let cargomiri =
1202+ builder. ensure ( tool:: CargoMiri { compiler, target, extra_features : Vec :: new ( ) } ) ?;
12241203
12251204 let mut tarball = Tarball :: new ( builder, "miri" , & target. triple ) ;
12261205 tarball. set_overlay ( OverlayKind :: Miri ) ;
@@ -1451,7 +1430,7 @@ impl Step for Extended {
14511430
14521431 let xform = |p : & Path | {
14531432 let mut contents = t ! ( fs:: read_to_string( p) ) ;
1454- for tool in & [ "rust-demangler" , "rust-analyzer" , "miri" , " rustfmt"] {
1433+ for tool in & [ "rust-demangler" , "rust-analyzer" , "rustfmt" ] {
14551434 if !built_tools. contains ( tool) {
14561435 contents = filter ( & contents, tool) ;
14571436 }
@@ -1491,7 +1470,8 @@ impl Step for Extended {
14911470 prepare ( "rust-std" ) ;
14921471 prepare ( "rust-analysis" ) ;
14931472 prepare ( "clippy" ) ;
1494- for tool in & [ "rust-docs" , "rust-demangler" , "rust-analyzer" , "miri" ] {
1473+ prepare ( "miri" ) ;
1474+ for tool in & [ "rust-docs" , "rust-demangler" , "rust-analyzer" ] {
14951475 if built_tools. contains ( tool) {
14961476 prepare ( tool) ;
14971477 }
@@ -1550,7 +1530,8 @@ impl Step for Extended {
15501530 prepare ( "rust-docs" ) ;
15511531 prepare ( "rust-std" ) ;
15521532 prepare ( "clippy" ) ;
1553- for tool in & [ "rust-demangler" , "rust-analyzer" , "miri" ] {
1533+ prepare ( "miri" ) ;
1534+ for tool in & [ "rust-demangler" , "rust-analyzer" ] {
15541535 if built_tools. contains ( tool) {
15551536 prepare ( tool) ;
15561537 }
@@ -1689,25 +1670,23 @@ impl Step for Extended {
16891670 . arg ( etc. join ( "msi/remove-duplicates.xsl" ) ) ,
16901671 ) ;
16911672 }
1692- if built_tools. contains ( "miri" ) {
1693- builder. run (
1694- Command :: new ( & heat)
1695- . current_dir ( & exe)
1696- . arg ( "dir" )
1697- . arg ( "miri" )
1698- . args ( & heat_flags)
1699- . arg ( "-cg" )
1700- . arg ( "MiriGroup" )
1701- . arg ( "-dr" )
1702- . arg ( "Miri" )
1703- . arg ( "-var" )
1704- . arg ( "var.MiriDir" )
1705- . arg ( "-out" )
1706- . arg ( exe. join ( "MiriGroup.wxs" ) )
1707- . arg ( "-t" )
1708- . arg ( etc. join ( "msi/remove-duplicates.xsl" ) ) ,
1709- ) ;
1710- }
1673+ builder. run (
1674+ Command :: new ( & heat)
1675+ . current_dir ( & exe)
1676+ . arg ( "dir" )
1677+ . arg ( "miri" )
1678+ . args ( & heat_flags)
1679+ . arg ( "-cg" )
1680+ . arg ( "MiriGroup" )
1681+ . arg ( "-dr" )
1682+ . arg ( "Miri" )
1683+ . arg ( "-var" )
1684+ . arg ( "var.MiriDir" )
1685+ . arg ( "-out" )
1686+ . arg ( exe. join ( "MiriGroup.wxs" ) )
1687+ . arg ( "-t" )
1688+ . arg ( etc. join ( "msi/remove-duplicates.xsl" ) ) ,
1689+ ) ;
17111690 builder. run (
17121691 Command :: new ( & heat)
17131692 . current_dir ( & exe)
@@ -1755,6 +1734,7 @@ impl Step for Extended {
17551734 . arg ( "-dStdDir=rust-std" )
17561735 . arg ( "-dAnalysisDir=rust-analysis" )
17571736 . arg ( "-dClippyDir=clippy" )
1737+ . arg ( "-dMiriDir=miri" )
17581738 . arg ( "-arch" )
17591739 . arg ( & arch)
17601740 . arg ( "-out" )
@@ -1768,9 +1748,6 @@ impl Step for Extended {
17681748 if built_tools. contains ( "rust-analyzer" ) {
17691749 cmd. arg ( "-dRustAnalyzerDir=rust-analyzer" ) ;
17701750 }
1771- if built_tools. contains ( "miri" ) {
1772- cmd. arg ( "-dMiriDir=miri" ) ;
1773- }
17741751 if target. ends_with ( "windows-gnu" ) {
17751752 cmd. arg ( "-dGccDir=rust-mingw" ) ;
17761753 }
@@ -1784,15 +1761,13 @@ impl Step for Extended {
17841761 candle ( "CargoGroup.wxs" . as_ref ( ) ) ;
17851762 candle ( "StdGroup.wxs" . as_ref ( ) ) ;
17861763 candle ( "ClippyGroup.wxs" . as_ref ( ) ) ;
1764+ candle ( "MiriGroup.wxs" . as_ref ( ) ) ;
17871765 if built_tools. contains ( "rust-demangler" ) {
17881766 candle ( "RustDemanglerGroup.wxs" . as_ref ( ) ) ;
17891767 }
17901768 if built_tools. contains ( "rust-analyzer" ) {
17911769 candle ( "RustAnalyzerGroup.wxs" . as_ref ( ) ) ;
17921770 }
1793- if built_tools. contains ( "miri" ) {
1794- candle ( "MiriGroup.wxs" . as_ref ( ) ) ;
1795- }
17961771 candle ( "AnalysisGroup.wxs" . as_ref ( ) ) ;
17971772
17981773 if target. ends_with ( "windows-gnu" ) {
@@ -1822,6 +1797,7 @@ impl Step for Extended {
18221797 . arg ( "StdGroup.wixobj" )
18231798 . arg ( "AnalysisGroup.wixobj" )
18241799 . arg ( "ClippyGroup.wixobj" )
1800+ . arg ( "MiriGroup.wixobj" )
18251801 . current_dir ( & exe) ;
18261802
18271803 if built_tools. contains ( "rust-analyzer" ) {
@@ -1830,9 +1806,6 @@ impl Step for Extended {
18301806 if built_tools. contains ( "rust-demangler" ) {
18311807 cmd. arg ( "RustDemanglerGroup.wixobj" ) ;
18321808 }
1833- if built_tools. contains ( "miri" ) {
1834- cmd. arg ( "MiriGroup.wixobj" ) ;
1835- }
18361809
18371810 if target. ends_with ( "windows-gnu" ) {
18381811 cmd. arg ( "GccGroup.wixobj" ) ;
0 commit comments