-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Enable SDL2 threads #8301
Enable SDL2 threads #8301
Conversation
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.
Nice!
@sbc100 Hmm, it seems that this PR causes undefined symbols when
I added a commit to create a separate |
6f77522
to
d2e65e6
Compare
@@ -16,7 +16,7 @@ def get(ports, settings, shared): | |||
|
|||
# get the port | |||
ports.fetch_project('sdl2', 'https://github.com/emscripten-ports/SDL2/archive/' + TAG + '.zip', SUBDIR) | |||
libname = ports.get_lib_name('libSDL2') | |||
libname = ports.get_lib_name('libSDL2' + ('-mt' if settings.USE_PTHREADS else '')) |
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.
This needs integration in embuilder.py, so that we can build the -mt
version there too.
I'm not sure what those test errors are on CI - hopefully they reproduce locally for easy debugging. If not let us know. |
@kripken I've added Some other failed tests appear to be from unresponsiveness, which led to the rest of the tests being skipped. I'm not sure those if are related. |
Nope, it appears related. The JS console is showing that the maximum call stack size has been exceeded. |
Found the problem. The non-multithreaded SDL2 variant was being built with the same pthread backend enabled config as the multithreaded variant. In addition to creating a separate library for enabling threads, we also need to not enable threads in the normal build. :) |
I still see 3 failing tests in test-browser-firefox, do you know what's going on there? |
Hmm, the failing tests are |
Hmm, I rebased on |
It's also worth mentioning that any program using SDL2 windowing and graphics, rather than just threading, requires the fixes from this PR to work. emscripten-ports/SDL2#77 |
Great, thanks @jakogut! I guess those errors were random CI problems then. |
This reverts commit f54f621.
This reverts commit f54f621.
Closes #8300