diff options
| author | bors <bors@rust-lang.org> | 2024-04-10 11:04:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-10 11:04:29 +0000 |
| commit | 788a1db8e54bf7b68c1fd3a5d4aa221917b6049e (patch) | |
| tree | ab9878a2031cbf3da1cf97227fa8635e17871e7c | |
| parent | f7feabc0e30c5cb8f1979dd17e6f96c6d5f8c885 (diff) | |
| parent | 852f4726710cf88e61cf4534f48c0d2b5348c2fd (diff) | |
| download | rust-788a1db8e54bf7b68c1fd3a5d4aa221917b6049e.tar.gz rust-788a1db8e54bf7b68c1fd3a5d4aa221917b6049e.zip | |
Auto merge of #3457 - RalfJung:replace-librs, r=RalfJung
MIRI_REPLACE_LIBRS_IF_NOT_TEST: also apply to crates.io crates This is needed to make https://github.com/rust-lang/compiler-builtins/pull/586 work.
| -rw-r--r-- | src/tools/miri/cargo-miri/src/phases.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/tools/miri/cargo-miri/src/phases.rs b/src/tools/miri/cargo-miri/src/phases.rs index 3f6c484a057..04f3b2918b5 100644 --- a/src/tools/miri/cargo-miri/src/phases.rs +++ b/src/tools/miri/cargo-miri/src/phases.rs @@ -454,15 +454,10 @@ pub fn phase_rustc(mut args: impl Iterator<Item = String>, phase: RustcPhase) { continue; } // If the REPLACE_LIBRS hack is enabled and we are building a `lib.rs` file, and a - // `lib.miri.rs` file exists, then build that instead. We only consider relative paths - // as cargo uses those for files in the workspace; dependencies from crates.io get - // absolute paths. + // `lib.miri.rs` file exists, then build that instead. if replace_librs { let path = Path::new(&arg); - if path.is_relative() - && path.file_name().is_some_and(|f| f == "lib.rs") - && path.is_file() - { + if path.file_name().is_some_and(|f| f == "lib.rs") && path.is_file() { let miri_rs = Path::new(&arg).with_extension("miri.rs"); if miri_rs.is_file() { if verbose > 0 { |
