Skip to content

Commit aa256bb

Browse files
committed
[emscripten] Remove -sWASM_BIGINT flag
This flag has been enabled by default in emscripten for a while now so I don't think we need this here anymore. Also remove the `-Wno-experimental` flag which is no longer needed for `-sMEMORY64`. Also remove `-sMODULARIZE` which is implied by `-sEXPORT_ES6`.
1 parent 61924cd commit aa256bb

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

CMakeLists.txt

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -297,21 +297,6 @@ else() # MSVC
297297
endif()
298298

299299
if(EMSCRIPTEN)
300-
# Note: to debug with DWARF you will usually want to enable BIGINT support, as
301-
# that helps avoid running Binaryen on the wasm after link. Binaryen's DWARF
302-
# rewriting has known limitations, so avoiding it during link is recommended
303-
# where possible (like local debugging).
304-
#
305-
# Note that this is debug info for Binaryen itself, that is, when you are
306-
# debugging Binaryen source code. This flag has no impact on what Binaryen
307-
# does when run on wasm files.
308-
option(ENABLE_BIGINT "Enable wasm BigInt support" OFF)
309-
if(ENABLE_BIGINT)
310-
add_link_flag("-sWASM_BIGINT")
311-
else()
312-
add_link_flag("-sWASM_BIGINT=0")
313-
endif()
314-
315300
if("${CMAKE_BUILD_TYPE}" MATCHES "Release")
316301
# Extra check that cmake has set -O3 in its release flags.
317302
# This is really as an assertion that cmake is behaving as we expect.
@@ -346,7 +331,6 @@ if(EMSCRIPTEN)
346331
add_link_flag("-sENVIRONMENT=web,worker")
347332
add_link_flag("-sINVOKE_RUN=0")
348333
add_link_flag("-sEXPORTED_RUNTIME_METHODS=run,callMain,FS")
349-
add_link_flag("-sMODULARIZE")
350334
add_link_flag("-sEXPORT_ES6")
351335
add_link_flag("-sFILESYSTEM")
352336
add_link_flag("-sFORCE_FILESYSTEM")
@@ -359,7 +343,7 @@ if(EMSCRIPTEN)
359343
add_nondebug_compile_flag("-flto")
360344
endif()
361345
if(EMSCRIPTEN_ENABLE_WASM64)
362-
add_compile_flag("-sMEMORY64 -Wno-experimental")
346+
add_compile_flag("-sMEMORY64")
363347
add_link_flag("-sMEMORY64")
364348
endif()
365349
endif()

scripts/test/shared.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def is_exe(fpath):
195195
which('gcc') or which('clang'))
196196
NATIVEXX = (os.environ.get('CXX') or which('mingw32-g++') or
197197
which('g++') or which('clang++'))
198-
NODEJS = os.environ.get('NODE') or which('node') or which('nodejs')
198+
NODEJS = os.environ.get('NODE') or os.environ.get('EMSDK_NODE') or which('node') or which('nodejs')
199199
MOZJS = which('mozjs') or which('spidermonkey')
200200

201201
V8 = os.environ.get('V8') or which('v8') or which('d8')
@@ -264,9 +264,8 @@ def has_shell_timeout():
264264

265265
try:
266266
if NODEJS is not None:
267-
subprocess.check_call([NODEJS, '--version'],
268-
stdout=subprocess.PIPE,
269-
stderr=subprocess.PIPE)
267+
version = subprocess.check_output([NODEJS, '--version'])
268+
print(f'Using node ({NODEJS}) version: {version.strip()}')
270269
except (OSError, subprocess.CalledProcessError):
271270
NODEJS = None
272271
if NODEJS is None:

0 commit comments

Comments
 (0)