We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 232d995 commit e4b4c4dCopy full SHA for e4b4c4d
src/lib.rs
@@ -480,8 +480,10 @@ panic = 'unwind'
480
// Set rustflags.
481
cmd.env("CARGO_ENCODED_RUSTFLAGS", encode_rustflags(&self.rustflags));
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.
484
let build_target_dir = build_dir.path().join("target");
485
cmd.env("CARGO_TARGET_DIR", &build_target_dir);
486
+ cmd.env("CARGO_BUILD_BUILD_DIR", &build_target_dir);
487
// To avoid metadata conflicts, we need to inject some custom data into the crate hash.
488
// bootstrap does the same at
489
// <https://github.com/rust-lang/rust/blob/c8e12cc8bf0de646234524924f39c85d9f3c7c37/src/bootstrap/builder.rs#L1613>.
0 commit comments