Skip to content

Commit

Permalink
fix(flag_check): don't link when targeting wasm32-unknown-unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
RubixDev committed Aug 1, 2023
1 parent b388631 commit bf5e057
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,9 @@ impl Build {

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

Expand Down

0 comments on commit bf5e057

Please sign in to comment.