Skip to content
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

New function emscripten_has_asyncify #9734

Merged
merged 3 commits into from Oct 31, 2019

Conversation

@Beuc
Copy link
Contributor

Beuc commented Oct 29, 2019

@gabrielcuvillier

This comment has been minimized.

Copy link
Contributor

gabrielcuvillier commented Oct 29, 2019

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

@sbc100

This comment has been minimized.

Copy link
Collaborator

sbc100 commented Oct 29, 2019

True, but I wonder what the space cost of RETAIN_COMPILER_SETTINGS is?

@Beuc

This comment has been minimized.

Copy link
Contributor Author

Beuc commented Oct 29, 2019

Also emscripten_get_compiler_setting hits a JavaScript error if not compiled-in.
Since we want to use the new function in the SDL2 port by default, that's annoying, and requires an update to existing build systems that use SDL2 outside of the port system (e.g. upstream SDL2 tarballs) so they add -s RETAIN_COMPILER_SETTINGS at link time. Not to mention people might not want to disclose their compiler settings :)
EDIT: size: out.js += 6kB

To a lesser extent the new functions also currently encapsulates ASYNCIFY||EMTERPRETER_ASYNC.

Copy link
Member

kripken left a comment

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.

site/source/docs/api_reference/emscripten.h.rst Outdated Show resolved Hide resolved
src/library.js Outdated Show resolved Hide resolved
@Beuc Beuc force-pushed the Beuc:hasasync branch from 013712a to ab85062 Oct 30, 2019
@Beuc

This comment has been minimized.

Copy link
Contributor Author

Beuc commented Oct 30, 2019

Done!

Copy link
Member

kripken left a comment

Perfect, thanks!

@kripken

This comment has been minimized.

Copy link
Member

kripken commented Oct 30, 2019

Oh wait, tests are failing, that's odd.

Do you see the failures locally as well?

@Beuc

This comment has been minimized.

Copy link
Contributor Author

Beuc commented Oct 30, 2019

test_emscripten_has_asyncify works locally for me.
Not sure what's happening :/

@Beuc

This comment has been minimized.

Copy link
Contributor Author

Beuc commented Oct 30, 2019

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.

@Beuc Beuc force-pushed the Beuc:hasasync branch from 1928796 to 5089f60 Oct 30, 2019
@kripken

This comment has been minimized.

Copy link
Member

kripken commented Oct 31, 2019

Makes sense to disable it for fastcomp, yeah.

@kripken kripken merged commit a05b7e6 into emscripten-core:incoming Oct 31, 2019
30 checks passed
30 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build-docs Your tests passed on CircleCI!
Details
ci/circleci: build-upstream-linux Your tests passed on CircleCI!
Details
ci/circleci: build-upstream-mac Your tests passed on CircleCI!
Details
ci/circleci: flake8 Your tests passed on CircleCI!
Details
ci/circleci: test-ab Your tests passed on CircleCI!
Details
ci/circleci: test-browser-chrome Your tests passed on CircleCI!
Details
ci/circleci: test-browser-firefox Your tests passed on CircleCI!
Details
ci/circleci: test-c Your tests passed on CircleCI!
Details
ci/circleci: test-d Your tests passed on CircleCI!
Details
ci/circleci: test-e Your tests passed on CircleCI!
Details
ci/circleci: test-f Your tests passed on CircleCI!
Details
ci/circleci: test-ghi Your tests passed on CircleCI!
Details
ci/circleci: test-jklmno Your tests passed on CircleCI!
Details
ci/circleci: test-other Your tests passed on CircleCI!
Details
ci/circleci: test-p Your tests passed on CircleCI!
Details
ci/circleci: test-qrst Your tests passed on CircleCI!
Details
ci/circleci: test-sanity Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-browser-chrome Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-browser-firefox Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-other Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-other-mac Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-wasm0 Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-wasm2 Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-wasm2js1 Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-wasm3 Your tests passed on CircleCI!
Details
ci/circleci: test-uvwxyz Your tests passed on CircleCI!
Details
ci/circleci: test-wasm0 Your tests passed on CircleCI!
Details
ci/circleci: test-wasm2 Your tests passed on CircleCI!
Details
ci/circleci: test-wasm3 Your tests passed on CircleCI!
Details
@Beuc Beuc deleted the Beuc:hasasync branch Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.