diff --git a/common.gypi b/common.gypi index 1effebe59bd4..62d92323343e 100644 --- a/common.gypi +++ b/common.gypi @@ -75,6 +75,9 @@ # Disable v8 hugepage by default. 'v8_enable_hugepage%': 0, + # Disabled by configure --v8-lite-mode. + 'v8_enable_webassembly%': 1, + # This is more of a V8 dev setting # https://github.com/nodejs/node/pull/22920/files#r222779926 'v8_enable_fast_mksnapshot': 0, @@ -509,6 +512,9 @@ ['v8_enable_v8_checks == 1', { 'defines': ['V8_ENABLE_CHECKS'], }], + ['v8_enable_webassembly == 1', { + 'defines': ['V8_ENABLE_WEBASSEMBLY'], + }], ['v8_enable_pointer_compression == 1', { 'defines': ['V8_COMPRESS_POINTERS'], }], diff --git a/src/node.cc b/src/node.cc index 838106acff8f..06f5d385afc5 100644 --- a/src/node.cc +++ b/src/node.cc @@ -786,8 +786,10 @@ static ExitCode ProcessGlobalArgsInternal(std::vector* args, v8_args.emplace_back("--js-source-phase-imports"); } +#if V8_ENABLE_WEBASSEMBLY // WebAssembly JS Promise Integration v8_args.emplace_back("--experimental-wasm-jspi"); +#endif // V8_ENABLE_WEBASSEMBLY #ifdef __POSIX__ // Block SIGPROF signals when sleeping in epoll_wait/kevent/etc. Avoids the