Auto merge of #1359 - RalfJung:cargo-bin-exe, r=RalfJung

test suite: rely on CARGO_BIN_EXE_ env vars

Just read about this in the 1.43 release notes. :)
This commit is contained in:
bors 2020-04-23 17:23:05 +00:00
commit 7c73dc3a4d
2 changed files with 2 additions and 8 deletions

View File

@ -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())

View File

@ -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"))
}
}