Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix querying emcc on windows #4248

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,12 @@ fn which_freebsd() -> Option<i32> {
}

fn emcc_version_code() -> Option<u64> {
#[cfg(target_os = "windows")]
let output = Command::new("emcc.bat").arg("-dumpversion").output().ok()?;

#[cfg(not(target_os = "windows"))]
Comment on lines +215 to +218
Copy link
Contributor

@tgross35 tgross35 Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could you use if cfg!(target_os = "windows") { ... } here instead? cfg!(...) is slightly preferred over #[cfg(...)] where possible since it allows the code to be checked on all OSs.

Otherwise lgtm, please squash with the change.

Fyi @hoodmane.

let output = Command::new("emcc").arg("-dumpversion").output().ok()?;

if !output.status.success() {
return None;
}
Expand Down
Loading