Skip to content

Commit 6a0a35c

Browse files
committed
Reinstate CARGO_PRIMARY_PACKAGE
1 parent 655e122 commit 6a0a35c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cargo/core/compiler/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,11 @@ fn prepare_rustc(
530530
let mut base = cx
531531
.compilation
532532
.rustc_process(unit, is_primary, is_workspace)?;
533+
534+
if is_primary {
535+
base.env("CARGO_PRIMARY_PACKAGE", "1");
536+
}
537+
533538
if cx.bcx.config.cli_unstable().jobserver_per_rustc {
534539
let client = cx.new_jobserver()?;
535540
base.inherit_jobserver(&client);

0 commit comments

Comments
 (0)