Skip to content

Commit 154617c

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

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

build.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,13 @@ fn which_freebsd() -> Option<i32> {
235235
}
236236

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

243246
let version = String::from_utf8(output.stdout).ok()?;
244247

0 commit comments

Comments
 (0)