Skip to content

Commit 45e3f61

Browse files
committed
Fix querying emcc on windows (use emcc.bat)
1 parent ec7da63 commit 45e3f61

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

build.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,18 @@ fn which_freebsd() -> Option<i32> {
235235
}
236236

237237
fn emcc_version_code() -> Option<u64> {
238-
let output = Command::new("emcc").arg("-dumpversion").output().ok()?;
238+
let output = if cfg!(target_os = "windows") {
239+
std::process::Command::new("emcc.bat")
240+
.arg("-dumpversion")
241+
.output()
242+
.ok()
243+
} else {
244+
std::process::Command::new("emcc")
245+
.arg("-dumpversion")
246+
.output()
247+
.ok()
248+
}?;
249+
239250
if !output.status.success() {
240251
return None;
241252
}

0 commit comments

Comments
 (0)