Skip to content

Commit af7d60d

Browse files
committed
[esm-integration] Dynamic linking is not implemented for ESM integration
See emscripten-core#24060
1 parent 152a6ab commit af7d60d

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
@@ -949,15 +949,17 @@ def is_2gb(self):
949949
return self.get_setting('INITIAL_MEMORY') == '2200mb'
950950

951951
def check_dylink(self):
952+
if self.get_setting('WASM_ESM_INTEGRATION'):
953+
self.skipTest('dynamic linking not supported with WASM_ESM_INTEGRATION')
952954
if self.is_wasm2js():
953-
self.skipTest('no dynamic linking support in wasm2js yet')
955+
self.skipTest('dynamic linking not supported with wasm2js')
954956
if '-fsanitize=undefined' in self.emcc_args:
955-
self.skipTest('no dynamic linking support in UBSan yet')
957+
self.skipTest('dynamic linking not supported with UBSan')
956958
# MEMORY64=2 mode doesn't currently support dynamic linking because
957959
# The side modules are lowered to wasm32 when they are built, making
958960
# them unlinkable with wasm64 binaries.
959961
if self.get_setting('MEMORY64') == 2:
960-
self.skipTest('MEMORY64=2 + dynamic linking is not currently supported')
962+
self.skipTest('dynamic linking not supported with MEMORY64=2')
961963

962964
def require_v8(self):
963965
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
@@ -9511,6 +9511,7 @@ def test_externref_emjs(self, dynlink):
95119511
self.emcc_args += ['-mreference-types']
95129512
self.node_args += shared.node_reference_types_flags(self.get_nodejs())
95139513
if dynlink:
9514+
self.check_dylink()
95149515
self.set_setting('MAIN_MODULE', 2)
95159516
self.do_core_test('test_externref_emjs.c')
95169517

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)