Repository navigation
Fix the emscripten build - #82
Merged
Merged
Conversation
Compiling with -sWASM=0 -sSUPPORT_BIG_ENDIAN=1 is no longer allowed, and yields a fatal error. It seems this combination was silently ignored but probably never worked. Big-endian support remains compatible with -sWASM=1 so we use it in those cases only.
joanise
force-pushed
the
dev.ej/fix-em-build
branch
from
October 21, 2026 21:18
eafaa14 to
8214222
Compare
Member
Author
|
Update: on second thought, I decided it does not make sense to remove big-endian support from the configurations where it appears to work, so I put it back in for the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Goal?
Fix the emscripten build so it works with a current emsdk.
-sSUPPORT_BIG_ENDIAN=1apparently already didn't really work with WASM=0, but that was silently ignored. Now the emsdk makes it a fatal error to combine those options. The solution appears to be to simply remove the big-endian support flag. The feature is marked "experimental" and we get a warning about that, too. I have no big-endian hardware I could possibly test this on anyway!just removing a warning:
#ifndef EMSCRIPTENissues a deprecation warning that says to use#ifndef __EMSCRIPTEN__instead.Fixes?
let CI test pass by fixing the emscripten build
Feedback sought?
confirmation that you agree it's OK to remove SUPPORT_BIG_ENDIAN.
If it's not OK everywhere, the two build commands in
js/CMakeLists.txtthat use-sWASM=1instead of 0 could be changed to-sWASM=1 -sSUPPORT_BIG_ENDIAN=1so we preserve it where it does not cause a compilation error.Priority?
medium. I need to fix this before making a release, which I'd like to do for the same of readalongs on Windows with Python 3.15
Tests added?
no
How to test?
build and test and js stuff, like CI does
Confidence?
medium-high