Repository navigation
Mark wasm2js (WASM=0) as deprecated - #27655
Merged
Merged
Conversation
sbc100
force-pushed
the
deprecate_wasm2js
branch
from
September 2, 2026 23:06
1f4ba4e to
9b759a0
Compare
kripken
reviewed
Sep 2, 2026
kripken
approved these changes
Sep 2, 2026
Add `WASM=0` to `DEPRECATED_SETTINGS` in `tools/settings.py` so that passing `-sWASM=0` emits a deprecation warning under `-Wdeprecated`. Also update settings documentation, `src/settings.js` comments, `ChangeLog.md`, and test runner/tests to ignore the warning where wasm2js is tested. See: emscripten-core#27608
sbc100
force-pushed
the
deprecate_wasm2js
branch
from
September 3, 2026 00:11
9b759a0 to
712e0c8
Compare
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Oct 9, 2026
`wasm2js` was marked as deprecated in emscripten-core#27655. This change removes support for compiling to JavaScript via `wasm2js` (`-sWASM=0` and `-sWASM=2`), moving `WASM` to `LEGACY_SETTINGS` with `[1]` as the only valid value. Also remove `src/wasm2js.js`, `tools/js_optimizer.py`, the `minifyGlobals`, `minifyLocals`, and `emitSymbolMap` passes in `tools/acorn-optimizer.mjs`, and all `wasm2js`-specific tests and test suites. Fixes: emscripten-core#27608
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Oct 9, 2026
`wasm2js` was marked as deprecated in emscripten-core#27655. This change removes support for compiling to JavaScript via `wasm2js` (`-sWASM=0` and `-sWASM=2`), moving `WASM` to `LEGACY_SETTINGS` with `[1]` as the only valid value. Also remove `src/wasm2js.js`, `tools/js_optimizer.py`, and the `minifyGlobals`, `minifyLocals`, and `emitSymbolMap` passes in `tools/acorn-optimizer.mjs`. In addition to removing the 6 `wasm2js*` core test suites and `wasm2js` parameterized test variants (including `@also_with_wasm2js`), this removes 57 test methods: - 39 `@only_wasm2js` tests in `test/test_core.py` that tested basic C/C++ codegen (such as `i64` arithmetic, `va_arg`, bitfields, and float conversions) which were only kept for `wasm2js` coverage since LLVM already tests its own Wasm codegen upstream. - 12 `wasm2js`-specific tests across `test/test_core.py` (2), `test/test_other.py` (6), and `test/test_browser.py` (4) that directly tested `-sWASM=0` or `-sWASM=2`. - 3 `tools/js_optimizer.py` tests in `test/test_other.py`, since the Python JS optimizer wrapper was only used by the `wasm2js` pipeline. - 2 long-skipped fastcomp `invoke_*` tests in `test/test_other.py`. - 1 `test_preallocated_heap` test in `test/test_browser.py`, which tested preallocating a plain `ArrayBuffer` (`Module['buffer']`) with `-sWASM=0` (an asm.js-era feature not applicable to Wasm). Fixes: emscripten-core#27608
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
WASM=0toDEPRECATED_SETTINGSintools/settings.pyso that passing-sWASM=0emits a deprecation warning under-Wdeprecated.Also update settings documentation,
src/settings.jscomments,ChangeLog.md, and test runner/tests to ignore the warning where wasm2js is tested.See: #27608