Auto merge of #2476 - RalfJung:target-dir, r=RalfJung
clarifying comments for target-dir handling I thought we could simplify this logic, but alas, `cargo metadata --target-dir` is not a thing (even though the effective target-dir *does* affect the metadata).
This commit is contained in:
commit
94b6aaf267
@ -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");
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user