Skip to content

Commit d43fdf5

Browse files
sbc100impact-maker
authored andcommitted
[Wasm64] Enable import/export name minification with MEMORY64 (emscripten-core#18897)
Also add a new code size test that uses MEMORY64.
1 parent fb72111 commit d43fdf5

8 files changed

+12
-4
lines changed

emcc.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2538,16 +2538,13 @@ def check_memory_setting(setting):
25382538
if settings.SHARED_MEMORY or settings.RELOCATABLE or settings.ASYNCIFY_LAZY_LOAD_CODE or settings.WASM2JS:
25392539
settings.IMPORTED_MEMORY = 1
25402540

2541-
# Any "pointers" passed to JS will now be i64's, in both modes.
2542-
# Also turn off minifying, which clashes with instrumented functions in preamble.js
25432541
if settings.MEMORY64:
25442542
if settings.ASYNCIFY and settings.MEMORY64 == 1:
25452543
exit_with_error('MEMORY64=1 is not compatible with ASYNCIFY')
25462544
if not settings.DISABLE_EXCEPTION_CATCHING:
25472545
exit_with_error('MEMORY64 is not compatible with DISABLE_EXCEPTION_CATCHING=0')
2546+
# Any "pointers" passed to JS will now be i64's, in both modes.
25482547
settings.WASM_BIGINT = 1
2549-
settings.MINIFY_WASM_IMPORTS_AND_EXPORTS = 0
2550-
settings.MINIFY_WASM_IMPORTED_MODULES = 0
25512548

25522549
if settings.WASM_BIGINT:
25532550
settings.LEGALIZE_JS_FFI = 0
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
a
2+
b
3+
c
4+
d
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
$__wasm_call_ctors
2+
$add
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4077
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
302

test/test_other.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7787,6 +7787,7 @@ def strip_numeric_suffixes(funcname):
77877787
'Os_mr': (['-Os', '-sMINIMAL_RUNTIME'], [], [], 74), # noqa
77887788
# EVAL_CTORS also removes the __wasm_call_ctors function
77897789
'Oz-ctors': (['-Oz', '-sEVAL_CTORS'], [], []), # noqa
7790+
'64': (['-Oz', '-sMEMORY64', '-Wno-experimental'], [], []), # noqa
77907791
})
77917792
def test_metadce_minimal(self, *args):
77927793
self.set_setting('INCOMING_MODULE_JS_API', [])

0 commit comments

Comments
 (0)