|
1 | 1 | //! Implements the various phases of `cargo miri run/test`.
|
2 | 2 |
|
3 | 3 | use std::env;
|
4 |
| -use std::fs::{self, File}; |
| 4 | +use std::fs::File; |
5 | 5 | use std::io::BufReader;
|
6 |
| -use std::path::{Path, PathBuf}; |
| 6 | +use std::path::{self, Path, PathBuf}; |
7 | 7 | use std::process::Command;
|
8 | 8 |
|
9 | 9 | use rustc_version::VersionMeta;
|
@@ -222,12 +222,12 @@ pub fn phase_cargo_miri(mut args: impl Iterator<Item = String>) {
|
222 | 222 | // that to be the Miri driver, but acting as rustc, in host mode.
|
223 | 223 | //
|
224 | 224 | // In `main`, we need the value of `RUSTC` to distinguish RUSTC_WRAPPER invocations from rustdoc
|
225 |
| - // or TARGET_RUNNER invocations, so we canonicalize it here to make it exceedingly unlikely that |
| 225 | + // or TARGET_RUNNER invocations, so we make it absolute to make it exceedingly unlikely that |
226 | 226 | // there would be a collision with other invocations of cargo-miri (as rustdoc or as runner). We
|
227 | 227 | // explicitly do this even if RUSTC_STAGE is set, since for these builds we do *not* want the
|
228 | 228 | // bootstrap `rustc` thing in our way! Instead, we have MIRI_HOST_SYSROOT to use for host
|
229 | 229 | // builds.
|
230 |
| - cmd.env("RUSTC", fs::canonicalize(find_miri()).unwrap()); |
| 230 | + cmd.env("RUSTC", path::absolute(find_miri()).unwrap()); |
231 | 231 | // In case we get invoked as RUSTC without the wrapper, let's be a host rustc. This makes no
|
232 | 232 | // sense for cross-interpretation situations, but without the wrapper, this will use the host
|
233 | 233 | // sysroot, so asking it to behave like a target build makes even less sense.
|
|
0 commit comments