Skip to content

Commit 2ed9f4e

Browse files
committed
miri-script: also overwrite CARGO_BUILD_BUILD_DIR
1 parent 4632c61 commit 2ed9f4e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

miri-script/src/util.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ impl MiriEnv {
6262
}
6363

6464
// Hard-code the target dir, since we rely on all binaries ending up in the same spot.
65-
sh.set_var("CARGO_TARGET_DIR", path!(miri_dir / "target"));
65+
// Cargo provides multiple ways to adjust this and we need to overwrite all of them.
66+
let target_dir = path!(miri_dir / "target");
67+
sh.set_var("CARGO_TARGET_DIR", &target_dir);
68+
sh.set_var("CARGO_BUILD_BUILD_DIR", &target_dir);
6669

6770
// We configure dev builds to not be unusably slow.
6871
let devel_opt_level =

0 commit comments

Comments
 (0)