Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 5283dd7

Browse files
authored
Unrolled build for rust-lang#128683
Rollup merge of rust-lang#128683 - RalfJung:miri-ui-test-deps, r=onur-ozkan bootstrap: clear miri's ui test deps when rustc changes `@onur-ozkan` I hope this makes sense... it's quite hard to test this, but it did at least cause one rebuild of the right files for me, and then it doesn't seem to keep rebuilding, so at first sight this look at least better than the status quo.
2 parents 9bad7ba + 2b584dc commit 5283dd7

File tree

1 file changed

+8
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+8
-0
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,14 @@ impl Step for Miri {
520520
builder.ensure(compile::Std::new(target_compiler, host));
521521
let host_sysroot = builder.sysroot(target_compiler);
522522

523+
// Miri has its own "target dir" for ui test dependencies. Make sure it gets cleared
524+
// properly when rustc changes. Similar to `Builder::cargo`, we skip this in dry runs to
525+
// make sure the relevant compiler has been set up properly.
526+
if !builder.config.dry_run() {
527+
let ui_test_dep_dir = builder.stage_out(host_compiler, Mode::ToolStd).join("miri_ui");
528+
builder.clear_if_dirty(&ui_test_dep_dir, &builder.rustc(host_compiler));
529+
}
530+
523531
// Run `cargo test`.
524532
// This is with the Miri crate, so it uses the host compiler.
525533
let mut cargo = tool::prepare_tool_cargo(

0 commit comments

Comments
 (0)