Skip to content

[ports] Pass integer for WASM_LEGACY_EXCEPTIONS when building ports - #27651

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:fix_legacy_exceptions
Sep 2, 2026
Merged

[ports] Pass integer for WASM_LEGACY_EXCEPTIONS when building ports#27651
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:fix_legacy_exceptions

Conversation

@sbc100

@sbc100 sbc100 commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

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

In emscripten-core#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.

Fixes: emscripten-core#27650
@sbc100
sbc100 enabled auto-merge (squash) September 2, 2026 18:42
@sbc100
sbc100 merged commit 2bdd1af into emscripten-core:main Sep 2, 2026
42 checks passed
@sbc100
sbc100 deleted the fix_legacy_exceptions branch September 2, 2026 23:24
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.

Problem with Freetype port with 6.0.9

2 participants