Skip to content

Simplify handling of --bigint in finalize_wasm. NFC - #27570

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:simplify_finalize_bigint
Aug 19, 2026
Merged

Simplify handling of --bigint in finalize_wasm. NFC#27570
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:simplify_finalize_bigint

Conversation

@sbc100

@sbc100 sbc100 commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

In wasm-emscripten-finalize, both --bigint and --no-legalize-javascript-ffi have the exact same effect: they prevent running the legalize-js-interface pass (if (!bigInt && legalizeJavaScriptFFI)).

Previously, when WASM_BIGINT was enabled, Emscripten was passing both --bigint and --no-legalize-javascript-ffi. In addition, when AUTODEBUG was enabled, --bigint was appended a second time.

Consolidate the check so --bigint is passed once when either WASM_BIGINT or AUTODEBUG is enabled, and remove the redundant --no-legalize-javascript-ffi flag.

Split out from #27558.

@sbc100

sbc100 commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator Author

As a followup I plan to remove this redundant flag from binaryen WebAssembly/binaryen#9016

In `wasm-emscripten-finalize`, both `--bigint` and
`--no-legalize-javascript-ffi` have the exact same effect: they prevent
running the `legalize-js-interface` pass (`if (!bigInt &&
legalizeJavaScriptFFI)`).

Previously, when `WASM_BIGINT` was enabled, Emscripten was passing both
`--bigint` and `--no-legalize-javascript-ffi`. In addition, when
`AUTODEBUG` was enabled, `--bigint` was appended a second time.

Consolidate the check so `--bigint` is passed once when either
`WASM_BIGINT` or `AUTODEBUG` is enabled, and remove the redundant
`--no-legalize-javascript-ffi` flag.

Split out from emscripten-core#27558.
@sbc100
sbc100 force-pushed the simplify_finalize_bigint branch from 1c99066 to 12b2a02 Compare August 19, 2026 20:11
@sbc100
sbc100 requested a review from dschuff August 19, 2026 20:33
@sbc100
sbc100 enabled auto-merge (squash) August 19, 2026 20:55
@sbc100
sbc100 merged commit 9bd5aa2 into emscripten-core:main Aug 19, 2026
42 checks passed
@sbc100
sbc100 deleted the simplify_finalize_bigint branch August 19, 2026 21:29
sbc100 added a commit to WebAssembly/binaryen that referenced this pull request Aug 19, 2026
This flag was redundant given that we have `--bigint`.  See
emscripten-core/emscripten#27570 for where
we stop using it in emscripten.
sbc100 added a commit to WebAssembly/binaryen that referenced this pull request Aug 20, 2026
…9016)

This flag was redundant given that we have `--bigint`. See
emscripten-core/emscripten#27570 for where we
stop using it in emscripten.
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