File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
bootstrap/src/core/build_steps Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -556,8 +556,13 @@ impl Step for Miri {
556556 // Miri has its own "target dir" for ui test dependencies. Make sure it gets cleared when
557557 // the sysroot gets rebuilt, to avoid "found possibly newer version of crate `std`" errors.
558558 if !builder. config . dry_run ( ) {
559- let ui_test_dep_dir =
560- builder. stage_out ( miri. build_compiler , Mode :: ToolStd ) . join ( "miri_ui" ) ;
559+ // This has to match `CARGO_TARGET_TMPDIR` in Miri's `ui.rs`.
560+ // This means we need `host` here as that's the target `ui.rs` is built for.
561+ let ui_test_dep_dir = builder
562+ . stage_out ( miri. build_compiler , Mode :: ToolStd )
563+ . join ( host)
564+ . join ( "tmp" )
565+ . join ( "miri_ui" ) ;
561566 // The mtime of `miri_sysroot` changes when the sysroot gets rebuilt (also see
562567 // <https://github.com/RalfJung/rustc-build-sysroot/commit/10ebcf60b80fe2c3dc765af0ff19fdc0da4b7466>).
563568 // We can hence use that directly as a signal to clear the ui test dir.
Original file line number Diff line number Diff line change @@ -97,6 +97,8 @@ fn miri_config(
9797 let mut config = Config {
9898 target : Some ( target. to_owned ( ) ) ,
9999 program,
100+ // When changing this, remember to also adjust the logic in bootstrap, in Miri's test step,
101+ // that deletes the `miri_ui` dir when it needs a rebuild.
100102 out_dir : PathBuf :: from ( env ! ( "CARGO_TARGET_TMPDIR" ) ) . join ( "miri_ui" ) ,
101103 threads : std:: env:: var ( "MIRI_TEST_THREADS" )
102104 . ok ( )
You can’t perform that action at this time.
0 commit comments