Skip to content

Improve longjmp stubs. NFC #18338

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
Dec 8, 2022
Merged

Improve longjmp stubs. NFC #18338

merged 1 commit into from
Dec 8, 2022

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Dec 8, 2022

  • Use elif here so its clear that we either include one block or the next, but never both.
  • Fix signature of setjmp.
  • Include the _emscripten_throw_longjmp stub regardless of INCLUDE_FULL_LIBRARY settings.

This final fix is a prerequisite for #16003. Without this change LLD_REPORT_UNDEFINED results in the following different error message:

-error: longjmp support was disabled (SUPPORT_LONGJMP=0), but it is required by the code (either set SUPPORT_LONGJMP=1, or remove uses of it in the project)
+wasm-ld: error: /usr/local/google/home/sbc/dev/wasm/emscripten/cache/sysroot/lib/wasm32-emscripten/libcompiler_rt.a(emscripten_setjmp.o): undefined symbol: _emscripten_throw_longjmp

- Use `elif` here so its clear that we either include one block or the
  next, but never both.
- Fix signature of setjmp.
- Include the `_emscripten_throw_longjmp` stub regardless of
  `INCLUDE_FULL_LIBRARY` settings.

This final fix is a prerequisite for #16003.
@sbc100 sbc100 requested a review from kripken December 8, 2022 00:28
@sbc100 sbc100 merged commit 48ace16 into main Dec 8, 2022
@sbc100 sbc100 deleted the clean_longjmp_stubs branch December 8, 2022 18:01
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