Skip to content

Commit 0428dd5

Browse files
committed
miri: add -Zbinary-dep-depinfo to dependency builds
1 parent f520900 commit 0428dd5

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/tools/clippy/tests/compile-test.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ impl TestContext {
173173
p.envs.push(("RUSTC_SNAPSHOT".into(), Some(rustc.into())));
174174
p.envs.push(("RUSTC_SNAPSHOT_LIBDIR".into(), Some(libdir.into())));
175175
p.envs.push(("RUSTC_SYSROOT".into(), Some(sysroot.into())));
176+
// Ensure we rebuild the dependencies when the sysroot changes.
177+
// (Bootstrap usually sets this automatically, but since we invoke cargo
178+
// ourselves we have to do it.)
179+
p.args.push("-Zbinary-dep-depinfo".into());
176180
}
177181
p
178182
},

src/tools/miri/tests/ui.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ fn miri_config(
133133
program: miri_path()
134134
.with_file_name(format!("cargo-miri{}", env::consts::EXE_SUFFIX)),
135135
// There is no `cargo miri build` so we just use `cargo miri run`.
136-
args: ["miri", "run"].into_iter().map(Into::into).collect(),
136+
// Add `-Zbinary-dep-depinfo` since it is needed for bootstrap builds (and doesn't harm otherwise).
137+
args: ["miri", "run", "--quiet", "-Zbinary-dep-depinfo"]
138+
.into_iter()
139+
.map(Into::into)
140+
.collect(),
137141
// Reset `RUSTFLAGS` to work around <https://github.com/rust-lang/rust/pull/119574#issuecomment-1876878344>.
138142
envs: vec![("RUSTFLAGS".into(), None)],
139143
..CommandBuilder::cargo()

0 commit comments

Comments
 (0)