Skip to content

Handle both emscripten_longjmp and emscripten_longjmp_jmpbuf #12157

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

Merged
merged 1 commit into from
Sep 11, 2020
Merged

Conversation

kripken
Copy link
Member

@kripken kripken commented Sep 10, 2020

The longer name appears from the wasm backend, and wasm-emscripten-finalize renames
it. Instead, support both, and then we can remove the long name either in LLVM or in
binaryen.

See WebAssembly/binaryen#3043

…ter appears without running wasm-emscripten-finalize)
@kripken kripken requested a review from sbc100 September 10, 2020 17:31
@sbc100
Copy link
Collaborator

sbc100 commented Sep 10, 2020

Can you add a comment with TODO to remove the long named version?

Why do we even need these at all?

@kripken
Copy link
Member Author

kripken commented Sep 10, 2020

I'm not sure why these exist - probably something with the emscripten-longjmp pass in the backend? cc @aheejin

@kripken
Copy link
Member Author

kripken commented Sep 10, 2020

(Note that regardless of the question of why we have these two names, I think we do want to land this - it will prevent a broken roll when we remove one of the names, no matter if we do that in LLVM or binaryen.)

Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry meant to lgtm first time around

@kripken kripken merged commit e7da81d into master Sep 11, 2020
@kripken kripken deleted the longjmp branch September 11, 2020 14:36
kripken added a commit to WebAssembly/binaryen that referenced this pull request Sep 11, 2020
Instead of finalize renaming emscripten_longjmp_jmpbuf to emscripten_longjmp,
do nothing in finalize. But in the optional --post-emscripten pass, rename it there if
both exist, so that we don't end up using two imports (other optimization passes
can then remove an unneeded import).

Depends on emscripten-core/emscripten#12157 to land first so that emscripten
can handle both names, and it is just an optimization to have one or the other.

See #3043
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants