Enable SDL2 threads#8301
Conversation
|
@sbc100 Hmm, it seems that this PR causes undefined symbols when I added a commit to create a separate |
6f77522 to
d2e65e6
Compare
| # 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.
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