-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New function emscripten_has_asyncify #9734
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
Conversation
Good idea. Actually, I can think of a way to already get the info: emscripten_get_compiler_setting("ASYNCIFY") It needs -s RETAIN_COMPILER_SETTINGS=1 though |
True, but I wonder what the space cost of RETAIN_COMPILER_SETTINGS is? |
Also To a lesser extent the new functions also currently encapsulates ASYNCIFY||EMTERPRETER_ASYNC. |
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.
Thanks! Looks good with some minor comments.
And agreed that while RETAIN_COMPILER_SETTINGS
can do the same, it's nice to have a direct API for this that doesn't require a new build flag for users. So this makes Asyncify easier for people to use.
Done! |
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.
Perfect, thanks!
Oh wait, tests are failing, that's odd. Do you see the failures locally as well? |
|
I can reproduce with fastcomp which complains about ASYNCIFY being removed, while we need to set it for the testcase - I disabled the test in fastcomp. |
Makes sense to disable it for fastcomp, yeah. |
Checks if ASYNCIFY was used in the build. This can help SDL decide how to sleep, Cf. emscripten-ports/SDL2#70
Cf. emscripten-ports/SDL2#70 (comment)