diff --git a/build.rs b/build.rs index 915b3a929b0b3..4c86db564a55a 100644 --- a/build.rs +++ b/build.rs @@ -212,7 +212,12 @@ fn which_freebsd() -> Option { } fn emcc_version_code() -> Option { + #[cfg(target_os = "windows")] + let output = Command::new("emcc.bat").arg("-dumpversion").output().ok()?; + + #[cfg(not(target_os = "windows"))] let output = Command::new("emcc").arg("-dumpversion").output().ok()?; + if !output.status.success() { return None; }