test suite: rely on CARGO_BIN_EXE_ env vars to find Miri binary
This commit is contained in:
parent
92b29721ba
commit
a5eaa5703c
2 changed files with 2 additions and 8 deletions
8
build.rs
8
build.rs
|
|
@ -1,11 +1,5 @@
|
|||
extern crate vergen;
|
||||
|
||||
use std::env;
|
||||
|
||||
fn main() {
|
||||
// Forward the profile to the main compilation
|
||||
println!("cargo:rustc-env=PROFILE={}", env::var("PROFILE").unwrap());
|
||||
// Don't rebuild miri even if nothing changed
|
||||
// Don't rebuild miri when nothing changed.
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
// vergen
|
||||
vergen::generate_cargo_keys(vergen::ConstantsFlags::all())
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ fn miri_path() -> PathBuf {
|
|||
if rustc_test_suite().is_some() {
|
||||
PathBuf::from(option_env!("MIRI_PATH").unwrap())
|
||||
} else {
|
||||
PathBuf::from(concat!("target/", env!("PROFILE"), "/miri"))
|
||||
PathBuf::from(env!("CARGO_BIN_EXE_miri"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue