Skip to content

Commit 055a243

Browse files
author
Jon Gjengset
committed
Ensure RUSTC_WRAPPER isn't set if no wrapper is used
1 parent 49d33c4 commit 055a243

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cargo/core/compiler/custom_build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ fn build_work(cx: &mut Context<'_, '_>, unit: &Unit) -> CargoResult<Job> {
252252
// Also inform the build script of the rustc compiler context.
253253
if let Some(wrapper) = bcx.rustc().wrapper.as_ref() {
254254
cmd.env("RUSTC_WRAPPER", wrapper);
255+
} else {
256+
cmd.env_remove("RUSTC_WRAPPER");
255257
}
256258
cmd.env("RUSTFLAGS", bcx.rustflags_args(unit).join(" "));
257259
let version = crate::version();

0 commit comments

Comments
 (0)