@@ -35,18 +35,6 @@ pub fn tmpdir(builder: &Builder<'_>) -> PathBuf {
35
35
builder. out . join ( "tmp/dist" )
36
36
}
37
37
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
-
50
38
fn should_build_extended_tool ( builder : & Builder < ' _ > , tool : & str ) -> bool {
51
39
if !builder. config . extended {
52
40
return false ;
@@ -1209,18 +1197,9 @@ impl Step for Miri {
1209
1197
let compiler = self . compiler ;
1210
1198
let target = self . target ;
1211
1199
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 ( ) } ) ?;
1224
1203
1225
1204
let mut tarball = Tarball :: new ( builder, "miri" , & target. triple ) ;
1226
1205
tarball. set_overlay ( OverlayKind :: Miri ) ;
@@ -1451,7 +1430,7 @@ impl Step for Extended {
1451
1430
1452
1431
let xform = |p : & Path | {
1453
1432
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" ] {
1455
1434
if !built_tools. contains ( tool) {
1456
1435
contents = filter ( & contents, tool) ;
1457
1436
}
@@ -1491,7 +1470,8 @@ impl Step for Extended {
1491
1470
prepare ( "rust-std" ) ;
1492
1471
prepare ( "rust-analysis" ) ;
1493
1472
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" ] {
1495
1475
if built_tools. contains ( tool) {
1496
1476
prepare ( tool) ;
1497
1477
}
@@ -1550,7 +1530,8 @@ impl Step for Extended {
1550
1530
prepare ( "rust-docs" ) ;
1551
1531
prepare ( "rust-std" ) ;
1552
1532
prepare ( "clippy" ) ;
1553
- for tool in & [ "rust-demangler" , "rust-analyzer" , "miri" ] {
1533
+ prepare ( "miri" ) ;
1534
+ for tool in & [ "rust-demangler" , "rust-analyzer" ] {
1554
1535
if built_tools. contains ( tool) {
1555
1536
prepare ( tool) ;
1556
1537
}
@@ -1689,25 +1670,23 @@ impl Step for Extended {
1689
1670
. arg ( etc. join ( "msi/remove-duplicates.xsl" ) ) ,
1690
1671
) ;
1691
1672
}
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
+ ) ;
1711
1690
builder. run (
1712
1691
Command :: new ( & heat)
1713
1692
. current_dir ( & exe)
@@ -1755,6 +1734,7 @@ impl Step for Extended {
1755
1734
. arg ( "-dStdDir=rust-std" )
1756
1735
. arg ( "-dAnalysisDir=rust-analysis" )
1757
1736
. arg ( "-dClippyDir=clippy" )
1737
+ . arg ( "-dMiriDir=miri" )
1758
1738
. arg ( "-arch" )
1759
1739
. arg ( & arch)
1760
1740
. arg ( "-out" )
@@ -1768,9 +1748,6 @@ impl Step for Extended {
1768
1748
if built_tools. contains ( "rust-analyzer" ) {
1769
1749
cmd. arg ( "-dRustAnalyzerDir=rust-analyzer" ) ;
1770
1750
}
1771
- if built_tools. contains ( "miri" ) {
1772
- cmd. arg ( "-dMiriDir=miri" ) ;
1773
- }
1774
1751
if target. ends_with ( "windows-gnu" ) {
1775
1752
cmd. arg ( "-dGccDir=rust-mingw" ) ;
1776
1753
}
@@ -1784,15 +1761,13 @@ impl Step for Extended {
1784
1761
candle ( "CargoGroup.wxs" . as_ref ( ) ) ;
1785
1762
candle ( "StdGroup.wxs" . as_ref ( ) ) ;
1786
1763
candle ( "ClippyGroup.wxs" . as_ref ( ) ) ;
1764
+ candle ( "MiriGroup.wxs" . as_ref ( ) ) ;
1787
1765
if built_tools. contains ( "rust-demangler" ) {
1788
1766
candle ( "RustDemanglerGroup.wxs" . as_ref ( ) ) ;
1789
1767
}
1790
1768
if built_tools. contains ( "rust-analyzer" ) {
1791
1769
candle ( "RustAnalyzerGroup.wxs" . as_ref ( ) ) ;
1792
1770
}
1793
- if built_tools. contains ( "miri" ) {
1794
- candle ( "MiriGroup.wxs" . as_ref ( ) ) ;
1795
- }
1796
1771
candle ( "AnalysisGroup.wxs" . as_ref ( ) ) ;
1797
1772
1798
1773
if target. ends_with ( "windows-gnu" ) {
@@ -1822,6 +1797,7 @@ impl Step for Extended {
1822
1797
. arg ( "StdGroup.wixobj" )
1823
1798
. arg ( "AnalysisGroup.wixobj" )
1824
1799
. arg ( "ClippyGroup.wixobj" )
1800
+ . arg ( "MiriGroup.wixobj" )
1825
1801
. current_dir ( & exe) ;
1826
1802
1827
1803
if built_tools. contains ( "rust-analyzer" ) {
@@ -1830,9 +1806,6 @@ impl Step for Extended {
1830
1806
if built_tools. contains ( "rust-demangler" ) {
1831
1807
cmd. arg ( "RustDemanglerGroup.wixobj" ) ;
1832
1808
}
1833
- if built_tools. contains ( "miri" ) {
1834
- cmd. arg ( "MiriGroup.wixobj" ) ;
1835
- }
1836
1809
1837
1810
if target. ends_with ( "windows-gnu" ) {
1838
1811
cmd. arg ( "GccGroup.wixobj" ) ;
0 commit comments