Skip to content

Commit bf5e057

Browse files
committed
fix(flag_check): don't link when targeting wasm32-unknown-unknown
1 parent b388631 commit bf5e057

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,9 @@ impl Build {
537537

538538
// We need to explicitly tell msvc not to link and create an exe
539539
// in the root directory of the crate
540-
if target.contains("msvc") && !self.cuda {
540+
// Additionally, checks for wasm32-unknown-unknown can easily falsely
541+
// fail when trying to link
542+
if (target.contains("msvc") && !self.cuda) || &*target == "wasm32-unknown-unknown" {
541543
cmd.arg("-c");
542544
}
543545

0 commit comments

Comments
 (0)