Fix compiletest linker flags for release builds.

This commit is contained in:
Sergio Benitez 2018-01-13 10:18:11 -08:00
parent 0f9828d095
commit 68b49f5d74
1 changed files with 7 additions and 0 deletions

View File

@ -10,11 +10,18 @@ pub fn run(mode: Mode) {
config.mode = mode;
config.src_base = PathBuf::from(format!("tests/{}", mode));
#[cfg(debug_assertions)]
let flags = [
"-L crate=../target/debug/",
"-L dependency=../target/debug/deps/",
].join(" ");
#[cfg(not(debug_assertions))]
let flags = [
"-L crate=../target/release/",
"-L dependency=../target/release/deps/",
].join(" ");
config.target_rustcflags = Some(flags);
run_tests(&config);
}