Skip to content

Commit b132051

Browse files
committed
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 rust-lang/compiler-builtins#586 work.
2 parents f70a3c4 + dd418ac commit b132051

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

cargo-miri/src/phases.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -454,15 +454,10 @@ pub fn phase_rustc(mut args: impl Iterator<Item = String>, phase: RustcPhase) {
454454
continue;
455455
}
456456
// If the REPLACE_LIBRS hack is enabled and we are building a `lib.rs` file, and a
457-
// `lib.miri.rs` file exists, then build that instead. We only consider relative paths
458-
// as cargo uses those for files in the workspace; dependencies from crates.io get
459-
// absolute paths.
457+
// `lib.miri.rs` file exists, then build that instead.
460458
if replace_librs {
461459
let path = Path::new(&arg);
462-
if path.is_relative()
463-
&& path.file_name().is_some_and(|f| f == "lib.rs")
464-
&& path.is_file()
465-
{
460+
if path.file_name().is_some_and(|f| f == "lib.rs") && path.is_file() {
466461
let miri_rs = Path::new(&arg).with_extension("miri.rs");
467462
if miri_rs.is_file() {
468463
if verbose > 0 {

0 commit comments

Comments
 (0)