mirror of https://github.com/rwf2/Rocket.git
Fix compiletest linker flags for release builds.
This commit is contained in:
parent
c63a947b98
commit
58f5988ec4
|
@ -8,11 +8,19 @@ fn run_mode(mode: &'static str) {
|
||||||
|
|
||||||
config.mode = cfg_mode;
|
config.mode = cfg_mode;
|
||||||
config.src_base = PathBuf::from(format!("tests/{}", mode));
|
config.src_base = PathBuf::from(format!("tests/{}", mode));
|
||||||
|
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
let flags = [
|
let flags = [
|
||||||
"-L crate=../target/debug/",
|
"-L crate=../target/debug/",
|
||||||
"-L dependency=../target/debug/deps/",
|
"-L dependency=../target/debug/deps/",
|
||||||
].join(" ");
|
].join(" ");
|
||||||
|
|
||||||
|
#[cfg(not(debug_assertions))]
|
||||||
|
let flags = [
|
||||||
|
"-L crate=../target/release/",
|
||||||
|
"-L dependency=../target/release/deps/",
|
||||||
|
].join(" ");
|
||||||
|
|
||||||
config.target_rustcflags = Some(flags);
|
config.target_rustcflags = Some(flags);
|
||||||
compiletest::run_tests(&config);
|
compiletest::run_tests(&config);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue