Skip to content

Commit fd3d660

Browse files
authored
Merge pull request #2365 from alexcrichton/fix-rustflags-for-native
Fix build when RUSTFLAGS is set for native builds
2 parents 35c92cb + e11b82a commit fd3d660

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ use cargo_target_dep::build_target_dep;
1010
const TIMER_TRIGGER_INTEGRATION_TEST: &str = "examples/spin-timer/app-example";
1111

1212
fn main() {
13+
// Don't inherit flags from our own invocation of cargo into sub-invocations
14+
// since the flags are intended for the host and we're compiling for wasm.
15+
std::env::remove_var("CARGO_ENCODED_RUSTFLAGS");
16+
1317
// Extract environment information to be passed to plugins.
1418
// Git information will be set to defaults if Spin is not
1519
// built within a Git worktree.

0 commit comments

Comments
 (0)