Skip to content

Commit a5eaa57

Browse files
committed
test suite: rely on CARGO_BIN_EXE_ env vars to find Miri binary
1 parent 92b2972 commit a5eaa57

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

build.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
extern crate vergen;
2-
3-
use std::env;
4-
51
fn main() {
6-
// Forward the profile to the main compilation
7-
println!("cargo:rustc-env=PROFILE={}", env::var("PROFILE").unwrap());
8-
// Don't rebuild miri even if nothing changed
2+
// Don't rebuild miri when nothing changed.
93
println!("cargo:rerun-if-changed=build.rs");
104
// vergen
115
vergen::generate_cargo_keys(vergen::ConstantsFlags::all())

tests/compiletest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn miri_path() -> PathBuf {
1212
if rustc_test_suite().is_some() {
1313
PathBuf::from(option_env!("MIRI_PATH").unwrap())
1414
} else {
15-
PathBuf::from(concat!("target/", env!("PROFILE"), "/miri"))
15+
PathBuf::from(env!("CARGO_BIN_EXE_miri"))
1616
}
1717
}
1818

0 commit comments

Comments
 (0)