Skip to content

Commit

Permalink
Disable bulk memory on wasm64 for older Node.js
Browse files Browse the repository at this point in the history
Bulk memory for wasm64 was implemented in V8 at v8/v8@18469ec which was first shipped in Node.js 18 (thanks @kleisauke).

Split out from emscripten-core#20549 where this was caught initially.

Fixes emscripten-core#20560.
  • Loading branch information
RReverser committed Oct 28, 2023
1 parent afa27ab commit 1253421
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions emcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2517,6 +2517,12 @@ def phase_linker_setup(options, state, newargs):
settings.SUPPORTS_PROMISE_ANY = feature_matrix.caniuse(feature_matrix.Feature.PROMISE_ANY)
if not settings.BULK_MEMORY:
settings.BULK_MEMORY = feature_matrix.caniuse(feature_matrix.Feature.BULK_MEMORY)
if settings.MEMORY64 and settings.MIN_NODE_VERSION < 180000:
logger.warning(
"Disabling bulk memory because it doesn't work correctly with wasm64 in Node.js < 18.\n"
"Set MIN_NODE_VERSION to 180000 or above to enable it."
)
settings.BULK_MEMORY = 0

if settings.AUDIO_WORKLET:
if settings.AUDIO_WORKLET == 1:
Expand Down

0 comments on commit 1253421

Please sign in to comment.