Skip to content

Commit 2a6121a

Browse files
committed
More cleanup
1 parent c271f82 commit 2a6121a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/bin/cargo-miri.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ path = "lib.rs"
425425
// architecture matches the host.
426426
let is_host = match target {
427427
None => true,
428-
Some(target) => target == host_triple(),
428+
Some(target) => target == rustc_version::version_meta().unwrap().host,
429429
};
430430
let sysroot = if is_host { dir.join("HOST") } else { PathBuf::from(dir) };
431431
std::env::set_var("MIRI_SYSROOT", &sysroot); // pass the env var to the processes we spawn, which will turn it into "--sysroot" flags
@@ -517,7 +517,6 @@ fn in_cargo_miri() {
517517
// The remaining targets we do not even want to build.
518518
_ => continue,
519519
}
520-
521520
// Add user-defined args until first `--`.
522521
while let Some(arg) = args.next() {
523522
if arg == "--" {
@@ -553,10 +552,6 @@ fn in_cargo_miri() {
553552
}
554553
}
555554

556-
fn host_triple() -> String {
557-
rustc_version::version_meta().unwrap().host
558-
}
559-
560555
fn inside_cargo_rustc() {
561556
let sysroot = std::env::var("MIRI_SYSROOT").expect("The wrapper should have set MIRI_SYSROOT");
562557

0 commit comments

Comments
 (0)