Skip to content

Commit 1e47c9c

Browse files
guuswtgross35
authored andcommitted
Fix querying emcc on windows (use emcc.bat)
(backport <#4248>) (cherry picked from commit 1606561)
1 parent d392ce7 commit 1e47c9c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,13 @@ fn which_freebsd() -> Option<i32> {
241241
}
242242

243243
fn emcc_version_code() -> Option<u64> {
244-
let output = Command::new("emcc").arg("-dumpversion").output().ok()?;
244+
let emcc = if cfg!(target_os = "windows") {
245+
"emcc.bat"
246+
} else {
247+
"emcc"
248+
};
249+
250+
let output = Command::new(emcc).arg("-dumpversion").output().ok()?;
245251
if !output.status.success() {
246252
return None;
247253
}

0 commit comments

Comments
 (0)