Skip to content

Commit

Permalink
Unrolled build for rust-lang#128683
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rust-timer authored Aug 7, 2024
2 parents 9bad7ba + 2b584dc commit 5283dd7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,14 @@ impl Step for Miri {
builder.ensure(compile::Std::new(target_compiler, host));
let host_sysroot = builder.sysroot(target_compiler);

// Miri has its own "target dir" for ui test dependencies. Make sure it gets cleared
// properly when rustc changes. Similar to `Builder::cargo`, we skip this in dry runs to
// make sure the relevant compiler has been set up properly.
if !builder.config.dry_run() {
let ui_test_dep_dir = builder.stage_out(host_compiler, Mode::ToolStd).join("miri_ui");
builder.clear_if_dirty(&ui_test_dep_dir, &builder.rustc(host_compiler));
}

// Run `cargo test`.
// This is with the Miri crate, so it uses the host compiler.
let mut cargo = tool::prepare_tool_cargo(
Expand Down

0 comments on commit 5283dd7

Please sign in to comment.