Skip to content

[build.zig] Fix Zig emscripten build#4012

Merged
raysan5 merged 3 commits intoraysan5:masterfrom
dylanlangston:master
May 29, 2024
Merged

[build.zig] Fix Zig emscripten build#4012
raysan5 merged 3 commits intoraysan5:masterfrom
dylanlangston:master

Conversation

@dylanlangston
Copy link
Contributor

This pull request fixes #4010. In Zig's master branch the path to the emsdk headers must be a relative path, as mentioned ziglang/zig#19623. Previously, in versions >= 0.12, this path was absolute.

This fix splits the code based on the current Zig version. If the current version is greater than 0.12.0 then we use a relative path and otherwise we use an absolute path. If upgrading to Zig's master branch this is a breaking change and the path supplied for the --sysroot must be relative to Zig's build directory.

Split the code for Zig's master branch and >= 0.12.0 due to changes in ziglang/zig#19623
Accidently removed a couple lines I didn't mean to 🙈
@raysan5
Copy link
Owner

raysan5 commented May 29, 2024

@dylanlangston thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[build] Zig emscripten build broken?

2 participants