From a5eaa5703c65c1708cdace6dfe11ebc84a9b4316 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 23 Apr 2020 19:20:09 +0200 Subject: [PATCH] test suite: rely on CARGO_BIN_EXE_ env vars to find Miri binary --- build.rs | 8 +------- tests/compiletest.rs | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/build.rs b/build.rs index 97bb9358832c..56956920e2e2 100644 --- a/build.rs +++ b/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()) diff --git a/tests/compiletest.rs b/tests/compiletest.rs index d082a2cc484b..ca1879962089 100644 --- a/tests/compiletest.rs +++ b/tests/compiletest.rs @@ -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")) } }