-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
SCons: Add stack_size
and default_pthread_stack_size
options to Web target
#75166
SCons: Add stack_size
and default_pthread_stack_size
options to Web target
#75166
Conversation
@Faless can you please take a look at this? This is still an issue and there's no easy way to pass these flags into emscripten otherwise. For verification purposes, you can see the default values for 3.1.26 vs. 3.1.27-current (3.1.50) here:
|
Sorry for the delay. Seems like we overlooked this, or the fact that it's fixing a critical build issue. It's described in the OP but was overlooked as this looked more like adding a new feature, than fixing a bug. For next time I may suggest opening a bug report so it would have been clear to us (and notably me as buildsystem maintainer) that we have a critical compatibility issue with Emscripten >= 3.1.27. We debugged this issue from another bug report #85564 and fixed it yesterday: #86036. So this fix is no longer needed technically. But the added configurability makes sense to me, so I think it can be rebased to make the new link flags added in #86036 use the options you're adding here. |
stack_size
and default_pthread_stack_size
options to Web target
830330e
to
a008138
Compare
This PR should be rebased on #86036 and updated to change the flags values in place. |
a008138
to
6788bc6
Compare
Rebased on the latest |
Thanks! |
Cherry-picked for 3.6. |
Cherry-picked for 4.2.2. |
This adds the following compile options to web builds with emscripten:
stack_size
: the stack size for the main thread (this cannot be adjusted at runtime), defaults to 5MBdefault_pthread_stack_size
: the default stack size for any pthreads spawned, defaults to 2MBThe reason for these options being added is because versions of emscripten prior to 3.1.27 had the above default values. emscripten 3.1.27 adjusted the defaults of these down to 64KiB. This ended up breaking a lot of things in Godot; the editor would simply crash due to a stack overflow upon load.
We may want to adjust the default values for these downwards for non-editor builds, but I figured I should just set it back to where it was for now.