build,src: gate jspi flag on V8_ENABLE_WEBASSEMBLY · nodejs/node@249e9a1 · GitHub
Skip to content

Commit 249e9a1

Browse files
authored
build,src: gate jspi flag on V8_ENABLE_WEBASSEMBLY
Since d937c8c ("wasm: enable JSPI") ProcessGlobalArgsInternal() unconditionally appends --experimental-wasm-jspi to the V8 argument list. V8 only defines the experimental_wasm_* flags when it is built with V8_ENABLE_WEBASSEMBLY, and configure --v8-lite-mode sets v8_enable_webassembly=0. V8::SetFlagsFromCommandLine() is called with remove_flags=true, which silently leaves unrecognized flags in argv, so node reports "bad option: --experimental-wasm-jspi" and exits with kInvalidCommandLineArgument. The first binary to run that code is node_mksnapshot, so every --v8-lite-mode build has failed since v24.20.0: bad option: --experimental-wasm-jspi node_mksnapshot failed with exit code 9 Forward v8_enable_webassembly to all targets as V8_ENABLE_WEBASSEMBLY, the same way common.gypi already forwards the other V8 build flags, and only push the JSPI flag when WebAssembly is compiled in. Refs: #59941 Assisted-by: claude:fable-5.1 Signed-off-by: Piotr Kubaj <pkubaj@FreeBSD.org> PR-URL: #66082 Reviewed-By: Guy Bedford <guybedford@gmail.com>
1 parent 6dab541 commit 249e9a1

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎common.gypi‎

Lines changed: 6 additions & 0 deletions

‎src/node.cc‎

Lines changed: 2 additions & 0 deletions

0 commit comments

Comments
 (0)