Skip to content

Commit 9755137

Browse files
committed
Auto merge of #1469 - RalfJung:relative, r=RalfJung
support relative XARGO_RUST_SRC
2 parents 9a0605d + ab65cb3 commit 9755137

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cargo-miri/bin.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,10 @@ fn setup(subcommand: MiriCommand) {
257257

258258
// Determine where the rust sources are located. `XARGO_RUST_SRC` env var trumps everything.
259259
let rust_src = match std::env::var_os("XARGO_RUST_SRC") {
260-
Some(val) => PathBuf::from(val),
260+
Some(val) => {
261+
let val = PathBuf::from(val);
262+
val.canonicalize().unwrap_or(val)
263+
}
261264
None => {
262265
// Check for `rust-src` rustup component.
263266
let sysroot = miri()

0 commit comments

Comments
 (0)