Rollup merge of #105640 - lukas-code:miri-beta, r=Mark-Simulacrum

Adjust miri to still be optional

r? `@pietroalbini`
This commit is contained in:
Matthias Krüger 2022-12-13 01:17:12 +01:00 committed by GitHub
commit 5af04471aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1470,7 +1470,7 @@ impl Step for Extended {
let xform = |p: &Path| { let xform = |p: &Path| {
let mut contents = t!(fs::read_to_string(p)); let mut contents = t!(fs::read_to_string(p));
for tool in &["rust-demangler"] { for tool in &["rust-demangler", "miri"] {
if !built_tools.contains(tool) { if !built_tools.contains(tool) {
contents = filter(&contents, tool); contents = filter(&contents, tool);
} }
@ -1510,9 +1510,8 @@ impl Step for Extended {
prepare("rust-std"); prepare("rust-std");
prepare("rust-analysis"); prepare("rust-analysis");
prepare("clippy"); prepare("clippy");
prepare("miri");
prepare("rust-analyzer"); prepare("rust-analyzer");
for tool in &["rust-docs", "rust-demangler"] { for tool in &["rust-docs", "rust-demangler", "miri"] {
if built_tools.contains(tool) { if built_tools.contains(tool) {
prepare(tool); prepare(tool);
} }
@ -1571,9 +1570,8 @@ impl Step for Extended {
prepare("rust-docs"); prepare("rust-docs");
prepare("rust-std"); prepare("rust-std");
prepare("clippy"); prepare("clippy");
prepare("miri");
prepare("rust-analyzer"); prepare("rust-analyzer");
for tool in &["rust-demangler"] { for tool in &["rust-demangler", "miri"] {
if built_tools.contains(tool) { if built_tools.contains(tool) {
prepare(tool); prepare(tool);
} }
@ -1710,23 +1708,25 @@ impl Step for Extended {
.arg(etc.join("msi/remove-duplicates.xsl")), .arg(etc.join("msi/remove-duplicates.xsl")),
); );
} }
builder.run( if built_tools.contains("miri") {
Command::new(&heat) builder.run(
.current_dir(&exe) Command::new(&heat)
.arg("dir") .current_dir(&exe)
.arg("miri") .arg("dir")
.args(&heat_flags) .arg("miri")
.arg("-cg") .args(&heat_flags)
.arg("MiriGroup") .arg("-cg")
.arg("-dr") .arg("MiriGroup")
.arg("Miri") .arg("-dr")
.arg("-var") .arg("Miri")
.arg("var.MiriDir") .arg("-var")
.arg("-out") .arg("var.MiriDir")
.arg(exe.join("MiriGroup.wxs")) .arg("-out")
.arg("-t") .arg(exe.join("MiriGroup.wxs"))
.arg(etc.join("msi/remove-duplicates.xsl")), .arg("-t")
); .arg(etc.join("msi/remove-duplicates.xsl")),
);
}
builder.run( builder.run(
Command::new(&heat) Command::new(&heat)
.current_dir(&exe) .current_dir(&exe)
@ -1774,7 +1774,6 @@ impl Step for Extended {
.arg("-dStdDir=rust-std") .arg("-dStdDir=rust-std")
.arg("-dAnalysisDir=rust-analysis") .arg("-dAnalysisDir=rust-analysis")
.arg("-dClippyDir=clippy") .arg("-dClippyDir=clippy")
.arg("-dMiriDir=miri")
.arg("-arch") .arg("-arch")
.arg(&arch) .arg(&arch)
.arg("-out") .arg("-out")
@ -1788,6 +1787,9 @@ impl Step for Extended {
if built_tools.contains("rust-analyzer") { if built_tools.contains("rust-analyzer") {
cmd.arg("-dRustAnalyzerDir=rust-analyzer"); cmd.arg("-dRustAnalyzerDir=rust-analyzer");
} }
if built_tools.contains("miri") {
cmd.arg("-dMiriDir=miri");
}
if target.ends_with("windows-gnu") { if target.ends_with("windows-gnu") {
cmd.arg("-dGccDir=rust-mingw"); cmd.arg("-dGccDir=rust-mingw");
} }
@ -1801,7 +1803,9 @@ impl Step for Extended {
candle("CargoGroup.wxs".as_ref()); candle("CargoGroup.wxs".as_ref());
candle("StdGroup.wxs".as_ref()); candle("StdGroup.wxs".as_ref());
candle("ClippyGroup.wxs".as_ref()); candle("ClippyGroup.wxs".as_ref());
candle("MiriGroup.wxs".as_ref()); if built_tools.contains("miri") {
candle("MiriGroup.wxs".as_ref());
}
if built_tools.contains("rust-demangler") { if built_tools.contains("rust-demangler") {
candle("RustDemanglerGroup.wxs".as_ref()); candle("RustDemanglerGroup.wxs".as_ref());
} }
@ -1837,9 +1841,11 @@ impl Step for Extended {
.arg("StdGroup.wixobj") .arg("StdGroup.wixobj")
.arg("AnalysisGroup.wixobj") .arg("AnalysisGroup.wixobj")
.arg("ClippyGroup.wixobj") .arg("ClippyGroup.wixobj")
.arg("MiriGroup.wixobj")
.current_dir(&exe); .current_dir(&exe);
if built_tools.contains("miri") {
cmd.arg("MiriGroup.wixobj");
}
if built_tools.contains("rust-analyzer") { if built_tools.contains("rust-analyzer") {
cmd.arg("RustAnalyzerGroup.wixobj"); cmd.arg("RustAnalyzerGroup.wixobj");
} }