Skip to content

Commit 963b8a6

Browse files
committed
fix: forward some env vars in guest bundle build script
1 parent 23b05b4 commit 963b8a6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

guests/bundle/build.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,18 @@ impl CommandExt for Command {
8282
let Ok(k) = k.into_string() else {
8383
continue;
8484
};
85-
if k.starts_with("CARGO") || k.starts_with("RUST") {
85+
86+
// Generally we do NOT want to forward rustc and cargo arguments set for this build
87+
// script. However some of them are used in CI to speed up compilation and reduce disk
88+
// space usage. So we hard-code these here.
89+
if (k.starts_with("CARGO") || k.starts_with("RUST"))
90+
&& !["CARGO_PROFILE_DEV_DEBUG", "CARGO_INCREMENTAL"]
91+
.into_iter()
92+
.any(|s| s == k)
93+
{
8694
continue;
8795
}
96+
8897
cmd = cmd.env(k, v);
8998
}
9099

0 commit comments

Comments
 (0)