Skip to content

Support both legacy and non-legacy EH in ports - #27579

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:wasm_eh_ports
Aug 20, 2026
Merged

Support both legacy and non-legacy EH in ports#27579
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:wasm_eh_ports

Conversation

@sbc100

@sbc100 sbc100 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Split out from #27575

@sbc100
sbc100 requested a review from aheejin August 20, 2026 22:38
@sbc100

sbc100 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator Author

Added some tests too.

@sbc100
sbc100 enabled auto-merge (squash) August 20, 2026 22:45
@sbc100
sbc100 disabled auto-merge August 20, 2026 23:39
@sbc100
sbc100 merged commit d0d3829 into emscripten-core:main Aug 20, 2026
38 of 42 checks passed
@sbc100
sbc100 deleted the wasm_eh_ports branch August 20, 2026 23:39
sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 21, 2026
sbc100 added a commit that referenced this pull request Aug 21, 2026
sbc100 added a commit that referenced this pull request Sep 2, 2026
…27651)

In #27579, `WASM_LEGACY_EXCEPTIONS` was forwarded to sub-compilations
when building ports with wasm SjLj. However,
`settings.WASM_LEGACY_EXCEPTIONS` defaults to a boolean (`True`) in
Python when not explicitly set via `-s` on the command line (e.g. when
using `-fwasm-exceptions`). Stringifying it into
`-sWASM_LEGACY_EXCEPTIONS={settings.WASM_LEGACY_EXCEPTIONS}` resulted in
`-sWASM_LEGACY_EXCEPTIONS=True`, which `emcc` rejects because boolean
settings require 1 or 0.

Ensure we format it as an integer so `1` or `0` is always passed.

Also, update the variants to set `WASM_LEGACY_EXCEPTIONS` to True/False
which means that the embuilder build of these libraries will fail in the
same way.

Fixes: #27650
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