-
Notifications
You must be signed in to change notification settings - Fork 818
When legalizing, export the original function too with orig$X #2427
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
|
Testing on emscripten, I noticed an issue that I fixed now: we don't want to export the original versions of dynCalls because they are only called by JS anyhow, and will not be used in the wasm table etc. |
|
@sbc100 I had second thoughts here, and added a flag to the pass now. It seems bad to add more exports unnecessarily. With the flag, only if exported originals are asked for, are they exported. Emcc can pass that flag when doing dynamic linking, but doesn't need to otherwise, saving code size in the normal case. Thoughts? |
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.
SGTM
This is necessary if we want to pass it to wasm, where it will be called directly, without JS legalization. For example the JS dynamic loader in emscripten needs this, emscripten-core/emscripten#9562