clarifying comments for target-dir handling

This commit is contained in:
Ralf Jung 2022-08-07 11:53:25 -04:00
parent 5b22aa7873
commit 0f1ce43502
2 changed files with 3 additions and 0 deletions

View File

@ -133,6 +133,7 @@ pub fn phase_cargo_miri(mut args: impl Iterator<Item = String>) {
}
}
// Detect the target directory if it's not specified via `--target-dir`.
// (`cargo metadata` does not support `--target-dir`, that's why we have to handle this ourselves.)
let target_dir = target_dir.get_or_insert_with(|| metadata.target_directory.clone());
// Set `--target-dir` to `miri` inside the original target directory.
target_dir.push("miri");

View File

@ -237,6 +237,8 @@ fn cargo_extra_flags() -> Vec<String> {
flags.push(manifest);
}
// Forwarding `--target-dir` would make sense, but `cargo metadata` does not support that flag.
flags
}