Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/tools/clippy/tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ impl TestContext {
p.envs.push(("RUSTC_SNAPSHOT".into(), Some(rustc.into())));
p.envs.push(("RUSTC_SNAPSHOT_LIBDIR".into(), Some(libdir.into())));
p.envs.push(("RUSTC_SYSROOT".into(), Some(sysroot.into())));
// Ensure we rebuild the dependencies when the sysroot changes.
// (Bootstrap usually sets this automatically, but since we invoke cargo
// ourselves we have to do it.)
p.args.push("-Zbinary-dep-depinfo".into());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured I would do the same thing on the clippy side as well, since it's basically the same setup as Miri.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if it applies when running the dependency builder but it is part of our config file https://github.com/rust-lang/rust-clippy/blob/40ad1a6ce2f41d98263336306ba5033c3ba5a491/.cargo/config.toml#L11

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know either.^^

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that clippy becomes part of the rustc workspace and cargo gets invoked from the repo root, I doubt that config file will be picked up by bootstrap.

}
p
},
Expand Down
6 changes: 5 additions & 1 deletion src/tools/miri/tests/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ fn miri_config(
program: miri_path()
.with_file_name(format!("cargo-miri{}", env::consts::EXE_SUFFIX)),
// There is no `cargo miri build` so we just use `cargo miri run`.
args: ["miri", "run"].into_iter().map(Into::into).collect(),
// Add `-Zbinary-dep-depinfo` since it is needed for bootstrap builds (and doesn't harm otherwise).
args: ["miri", "run", "--quiet", "-Zbinary-dep-depinfo"]
.into_iter()
.map(Into::into)
.collect(),
// Reset `RUSTFLAGS` to work around <https://github.com/rust-lang/rust/pull/119574#issuecomment-1876878344>.
envs: vec![("RUSTFLAGS".into(), None)],
..CommandBuilder::cargo()
Expand Down
Loading