-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
[Web] Fix thread+dlink builds with emscripten 3.1.61+git #93143
Merged
akien-mga
merged 4 commits into
godotengine:master
from
Faless:web/fix_dlink_emcc_3.1.62
Jun 14, 2024
Merged
[Web] Fix thread+dlink builds with emscripten 3.1.61+git #93143
akien-mga
merged 4 commits into
godotengine:master
from
Faless:web/fix_dlink_emcc_3.1.62
Jun 14, 2024
Conversation
This file contains 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
Faless
force-pushed
the
web/fix_dlink_emcc_3.1.62
branch
from
June 13, 2024 23:47
ffded59
to
6893ac1
Compare
akien-mga
approved these changes
Jun 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me!
adamscott
reviewed
Jun 14, 2024
adamscott
reviewed
Jun 14, 2024
adamscott
approved these changes
Jun 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine with the small change I proposed! Thanks Fabio!
SUPPORT_LONGJMP have changed since emscripten 3.1.32 to default to "wasm" mode when exceptions are enabled, and "emscripten" mode when disabled. While we generally doesn't use exception in core, linked libraries may need them, and emscripten don't plan to support WASM EH + Emscripten SjLj in the long term.
They're of little help, and just adds to the possibility of causing deadlocks.
Instead of calling loadDynamicLibraries ourselves, we add the GDExtension libraries to preload to the "dynamicLibraries" module config property. This seems to fix some threading issue with some browsers during the init phase.
Faless
force-pushed
the
web/fix_dlink_emcc_3.1.62
branch
from
June 14, 2024 14:04
6893ac1
to
27d67b5
Compare
Thanks! Awesome work 🎉 |
7 tasks
This was referenced Jul 10, 2024
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.
This PR does few things to restore and improve thread+dlink web builds:
-s OPTION=value
to-sOPTION=value
to get rid of a nasty warning (I can split this in a separate PR if you prefer, since it adds a bit of noise)SUPPORT_LONGJMP
option to'wasm'
to improve gdextension interop (see emscripten 3.1.32 changelog).I'll open a godot-cpp PR to add the same flags(godot-cpp counterpart [Web] Force emcc to use "wasm" longjmp mode godot-cpp#1489).dynamicLibraries
option to preload GDExtensions instead of manually callingloadDynamicLibrary
which seems to avoid a deadlock on firefox (see https://bugzilla.mozilla.org/show_bug.cgi?id=1897427 ).Note, emscripten 3.1.62 is unreleased, I've taken 3.1.61 and applied emscripten-core/emscripten#19496