Skip to content

Commit 1abf03c

Browse files
authored
[esm-integration] Dynamic linking is not implemented for ESM integration (emscripten-core#24310)
See emscripten-core#24060
1 parent 8e3d62c commit 1abf03c

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

test/common.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -956,15 +956,17 @@ def is_2gb(self):
956956
return self.get_setting('INITIAL_MEMORY') == '2200mb'
957957

958958
def check_dylink(self):
959+
if self.get_setting('WASM_ESM_INTEGRATION'):
960+
self.skipTest('dynamic linking not supported with WASM_ESM_INTEGRATION')
959961
if self.is_wasm2js():
960-
self.skipTest('no dynamic linking support in wasm2js yet')
962+
self.skipTest('dynamic linking not supported with wasm2js')
961963
if '-fsanitize=undefined' in self.emcc_args:
962-
self.skipTest('no dynamic linking support in UBSan yet')
964+
self.skipTest('dynamic linking not supported with UBSan')
963965
# MEMORY64=2 mode doesn't currently support dynamic linking because
964966
# The side modules are lowered to wasm32 when they are built, making
965967
# them unlinkable with wasm64 binaries.
966968
if self.get_setting('MEMORY64') == 2:
967-
self.skipTest('MEMORY64=2 + dynamic linking is not currently supported')
969+
self.skipTest('dynamic linking not supported with MEMORY64=2')
968970

969971
def require_v8(self):
970972
if not config.V8_ENGINE or config.V8_ENGINE not in config.JS_ENGINES:

test/test_core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9525,6 +9525,7 @@ def test_externref_emjs(self, dynlink):
95259525
self.emcc_args += ['-mreference-types']
95269526
self.node_args += shared.node_reference_types_flags(self.get_nodejs())
95279527
if dynlink:
9528+
self.check_dylink()
95289529
self.set_setting('MAIN_MODULE', 2)
95299530
self.do_core_test('test_externref_emjs.c')
95309531

tools/link.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,8 @@ def phase_linker_setup(options, linker_args): # noqa: C901, PLR0912, PLR0915
790790
default_setting('MODULARIZE', 'instance')
791791
if not settings.EXPORT_ES6 or settings.MODULARIZE != 'instance':
792792
exit_with_error('WASM_ESM_INTEGRATION requires EXPORT_ES6 and MODULARIZE=instance')
793+
if settings.RELOCATABLE:
794+
exit_with_error('WASM_ESM_INTEGRATION is not compatible with dynamic linking')
793795

794796
if settings.MODULARIZE and settings.MODULARIZE not in [1, 'instance']:
795797
exit_with_error(f'Invalid setting "{settings.MODULARIZE}" for MODULARIZE.')

0 commit comments

Comments
 (0)