Skip to content

Commit cea46dd

Browse files
committed
Use relative deps path
1 parent 7f1c2c0 commit cea46dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/compile-test.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,16 @@ fn default_config() -> compiletest::Config {
120120
config.run_lib_path = path.clone();
121121
config.compile_lib_path = path;
122122
}
123+
let current_exe_path = std::env::current_exe().unwrap();
124+
let deps_path = current_exe_path.parent().unwrap();
123125

124126
// Using `-L dependency={}` enforces that external dependencies are added with `--extern`.
125127
// This is valuable because a) it allows us to monitor what external dependencies are used
126128
// and b) it ensures that conflicting rlibs are resolved properly.
127129
config.target_rustcflags = Some(format!(
128130
"--emit=metadata -L dependency={} -L dependency={} -Dwarnings -Zui-testing {}",
129131
host_lib().join("deps").display(),
130-
cargo::TARGET_LIB.join("deps").display(),
132+
deps_path.display(),
131133
extern_flags(),
132134
));
133135

0 commit comments

Comments
 (0)