Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 0f1ce43

Browse files
committed
clarifying comments for target-dir handling
1 parent 5b22aa7 commit 0f1ce43

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

cargo-miri/src/phases.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ pub fn phase_cargo_miri(mut args: impl Iterator<Item = String>) {
133133
}
134134
}
135135
// Detect the target directory if it's not specified via `--target-dir`.
136+
// (`cargo metadata` does not support `--target-dir`, that's why we have to handle this ourselves.)
136137
let target_dir = target_dir.get_or_insert_with(|| metadata.target_directory.clone());
137138
// Set `--target-dir` to `miri` inside the original target directory.
138139
target_dir.push("miri");

cargo-miri/src/util.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ fn cargo_extra_flags() -> Vec<String> {
237237
flags.push(manifest);
238238
}
239239

240+
// Forwarding `--target-dir` would make sense, but `cargo metadata` does not support that flag.
241+
240242
flags
241243
}
242244

0 commit comments

Comments
 (0)