File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -480,8 +480,10 @@ panic = 'unwind'
480
480
// Set rustflags.
481
481
cmd. env ( "CARGO_ENCODED_RUSTFLAGS" , encode_rustflags ( & self . rustflags ) ) ;
482
482
// Make sure the results end up where we expect them.
483
+ // Cargo provides multiple ways to adjust this and we need to overwrite all of them.
483
484
let build_target_dir = build_dir. path ( ) . join ( "target" ) ;
484
485
cmd. env ( "CARGO_TARGET_DIR" , & build_target_dir) ;
486
+ cmd. env ( "CARGO_BUILD_BUILD_DIR" , & build_target_dir) ;
485
487
// To avoid metadata conflicts, we need to inject some custom data into the crate hash.
486
488
// bootstrap does the same at
487
489
// <https://github.com/rust-lang/rust/blob/c8e12cc8bf0de646234524924f39c85d9f3c7c37/src/bootstrap/builder.rs#L1613>.
You can’t perform that action at this time.
0 commit comments