Skip to content

Fix emscripten build for emsdk 3.x#554

Open
theMansib wants to merge 1 commit intoCE-Programming:masterfrom
theMansib:fix/emscripten-emsdk3
Open

Fix emscripten build for emsdk 3.x#554
theMansib wants to merge 1 commit intoCE-Programming:masterfrom
theMansib:fix/emscripten-emsdk3

Conversation

@theMansib
Copy link

The emscripten build target doesn't compile on emsdk 3.x. EXTRA_EXPORTED_RUNTIME_METHODS was renamed to EXPORTED_RUNTIME_METHODS, the .bc object extension is deprecated in favor of .o, and gui_handle_reset() is missing from os-emscripten.c causing an undefined symbol at link time.

This adds an explicit EXPORTED_FUNCTIONS list for all EMSCRIPTEN_KEEPALIVE symbols and fixes the above issues. Tested with emsdk 3.1.74.

- Rename EXTRA_EXPORTED_RUNTIME_METHODS to EXPORTED_RUNTIME_METHODS
- Add explicit EXPORTED_FUNCTIONS list for all KEEPALIVE symbols
- Change .bc object extension to .o (deprecated in modern LLVM)
- Add missing gui_handle_reset() (undefined symbol at link time)
@adriweb
Copy link
Member

adriweb commented Feb 16, 2026

I'll check it out in a bit, thanks

@theMansib
Copy link
Author

No probs! :)

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

Development

Successfully merging this pull request may close these issues.

2 participants