diff --git a/codegen/tests/compiletest.rs b/codegen/tests/compiletest.rs index 6e604fca..c772a49d 100644 --- a/codegen/tests/compiletest.rs +++ b/codegen/tests/compiletest.rs @@ -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); }