Skip to content

Commit 5af0447

Browse files
authored
Rollup merge of rust-lang#105640 - lukas-code:miri-beta, r=Mark-Simulacrum
Adjust miri to still be optional r? `@pietroalbini`
2 parents 84a725e + 4ac8190 commit 5af0447

File tree

1 file changed

+31
-25
lines changed

1 file changed

+31
-25
lines changed

src/bootstrap/dist.rs

+31-25
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ impl Step for Extended {
14701470

14711471
let xform = |p: &Path| {
14721472
let mut contents = t!(fs::read_to_string(p));
1473-
for tool in &["rust-demangler"] {
1473+
for tool in &["rust-demangler", "miri"] {
14741474
if !built_tools.contains(tool) {
14751475
contents = filter(&contents, tool);
14761476
}
@@ -1510,9 +1510,8 @@ impl Step for Extended {
15101510
prepare("rust-std");
15111511
prepare("rust-analysis");
15121512
prepare("clippy");
1513-
prepare("miri");
15141513
prepare("rust-analyzer");
1515-
for tool in &["rust-docs", "rust-demangler"] {
1514+
for tool in &["rust-docs", "rust-demangler", "miri"] {
15161515
if built_tools.contains(tool) {
15171516
prepare(tool);
15181517
}
@@ -1571,9 +1570,8 @@ impl Step for Extended {
15711570
prepare("rust-docs");
15721571
prepare("rust-std");
15731572
prepare("clippy");
1574-
prepare("miri");
15751573
prepare("rust-analyzer");
1576-
for tool in &["rust-demangler"] {
1574+
for tool in &["rust-demangler", "miri"] {
15771575
if built_tools.contains(tool) {
15781576
prepare(tool);
15791577
}
@@ -1710,23 +1708,25 @@ impl Step for Extended {
17101708
.arg(etc.join("msi/remove-duplicates.xsl")),
17111709
);
17121710
}
1713-
builder.run(
1714-
Command::new(&heat)
1715-
.current_dir(&exe)
1716-
.arg("dir")
1717-
.arg("miri")
1718-
.args(&heat_flags)
1719-
.arg("-cg")
1720-
.arg("MiriGroup")
1721-
.arg("-dr")
1722-
.arg("Miri")
1723-
.arg("-var")
1724-
.arg("var.MiriDir")
1725-
.arg("-out")
1726-
.arg(exe.join("MiriGroup.wxs"))
1727-
.arg("-t")
1728-
.arg(etc.join("msi/remove-duplicates.xsl")),
1729-
);
1711+
if built_tools.contains("miri") {
1712+
builder.run(
1713+
Command::new(&heat)
1714+
.current_dir(&exe)
1715+
.arg("dir")
1716+
.arg("miri")
1717+
.args(&heat_flags)
1718+
.arg("-cg")
1719+
.arg("MiriGroup")
1720+
.arg("-dr")
1721+
.arg("Miri")
1722+
.arg("-var")
1723+
.arg("var.MiriDir")
1724+
.arg("-out")
1725+
.arg(exe.join("MiriGroup.wxs"))
1726+
.arg("-t")
1727+
.arg(etc.join("msi/remove-duplicates.xsl")),
1728+
);
1729+
}
17301730
builder.run(
17311731
Command::new(&heat)
17321732
.current_dir(&exe)
@@ -1774,7 +1774,6 @@ impl Step for Extended {
17741774
.arg("-dStdDir=rust-std")
17751775
.arg("-dAnalysisDir=rust-analysis")
17761776
.arg("-dClippyDir=clippy")
1777-
.arg("-dMiriDir=miri")
17781777
.arg("-arch")
17791778
.arg(&arch)
17801779
.arg("-out")
@@ -1788,6 +1787,9 @@ impl Step for Extended {
17881787
if built_tools.contains("rust-analyzer") {
17891788
cmd.arg("-dRustAnalyzerDir=rust-analyzer");
17901789
}
1790+
if built_tools.contains("miri") {
1791+
cmd.arg("-dMiriDir=miri");
1792+
}
17911793
if target.ends_with("windows-gnu") {
17921794
cmd.arg("-dGccDir=rust-mingw");
17931795
}
@@ -1801,7 +1803,9 @@ impl Step for Extended {
18011803
candle("CargoGroup.wxs".as_ref());
18021804
candle("StdGroup.wxs".as_ref());
18031805
candle("ClippyGroup.wxs".as_ref());
1804-
candle("MiriGroup.wxs".as_ref());
1806+
if built_tools.contains("miri") {
1807+
candle("MiriGroup.wxs".as_ref());
1808+
}
18051809
if built_tools.contains("rust-demangler") {
18061810
candle("RustDemanglerGroup.wxs".as_ref());
18071811
}
@@ -1837,9 +1841,11 @@ impl Step for Extended {
18371841
.arg("StdGroup.wixobj")
18381842
.arg("AnalysisGroup.wixobj")
18391843
.arg("ClippyGroup.wixobj")
1840-
.arg("MiriGroup.wixobj")
18411844
.current_dir(&exe);
18421845

1846+
if built_tools.contains("miri") {
1847+
cmd.arg("MiriGroup.wixobj");
1848+
}
18431849
if built_tools.contains("rust-analyzer") {
18441850
cmd.arg("RustAnalyzerGroup.wixobj");
18451851
}

0 commit comments

Comments
 (0)