bootstrap: clear miri's ui test deps when rustc changes · rust-lang/rust@2b584dc (original) (raw)

File tree

1 file changed

lines changed

1 file changed

lines changed

Original file line number Diff line number Diff line change
@@ -520,6 +520,14 @@ impl Step for Miri {
520 520 builder.ensure(compile::Std::new(target_compiler, host));
521 521 let host_sysroot = builder.sysroot(target_compiler);
522 522
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 +
523 531 // Run `cargo test`.
524 532 // This is with the Miri crate, so it uses the host compiler.
525 533 let mut cargo = tool::prepare_tool_cargo(