Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/jsifier.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ function(${args}) {
}
if (isStub) {
contentText += `\n${mangled}.stub = true;`;
if (ASYNCIFY) {
if (ASYNCIFY && MAIN_MODULE) {
contentText += `\nasyncifyStubs['${symbol}'] = undefined;`;
}
}
Expand Down
12 changes: 6 additions & 6 deletions test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def metafunc(self, with_minimal_runtime, *args, **kwargs):
def also_with_wasm_bigint(f):
assert callable(f)

def metafunc(self, with_bigint):
def metafunc(self, with_bigint, *args, **kwargs):
if with_bigint:
if self.is_wasm2js():
self.skipTest('wasm2js does not support WASM_BIGINT')
Expand All @@ -414,9 +414,9 @@ def metafunc(self, with_bigint):
self.set_setting('WASM_BIGINT')
nodejs = self.require_node()
self.node_args += shared.node_bigint_flags(nodejs)
f(self)
f(self, *args, **kwargs)
else:
f(self)
f(self, *args, **kwargs)

metafunc._parameterize = {'': (False,),
'bigint': (True,)}
Expand All @@ -426,14 +426,14 @@ def metafunc(self, with_bigint):
def also_with_wasm64(f):
assert callable(f)

def metafunc(self, with_wasm64):
def metafunc(self, with_wasm64, *args, **kwargs):
if with_wasm64:
self.require_wasm64()
self.set_setting('MEMORY64')
self.emcc_args.append('-Wno-experimental')
f(self)
f(self, *args, **kwargs)
else:
f(self)
f(self, *args, **kwargs)

metafunc._parameterize = {'': (False,),
'wasm64': (True,)}
Expand Down
7 changes: 5 additions & 2 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -12678,8 +12678,11 @@ def test_check_undefined(self, flag):
err = self.expect_fail([EMCC, flag, '-sERROR_ON_UNDEFINED_SYMBOLS', test_file('other/test_check_undefined.c')])
self.assertContained('undefined symbol: foo', err)

@parameterized({
'asyncify': (['-sASYNCIFY'],),
})
@also_with_wasm64
def test_missing_symbols_at_runtime(self):
def test_missing_symbols_at_runtime(self, args):
# We deliberately pick a symbol there that takes a pointer as an argument.
# We had a regression where the pointer-handling wrapper function could
# not be created because the "missing functions" stubs don't take any
Expand All @@ -12694,7 +12697,7 @@ def test_missing_symbols_at_runtime(self):

expected = 'Aborted(missing function: glGetTexLevelParameteriv)'
self.do_runf('test.c', expected,
emcc_args=['-sWARN_ON_UNDEFINED_SYMBOLS=0', '-sAUTO_JS_LIBRARIES=0'],
emcc_args=['-sWARN_ON_UNDEFINED_SYMBOLS=0', '-sAUTO_JS_LIBRARIES=0'] + args,
assert_returncode=NON_ZERO)

@with_env_modify({'EMMAKEN_NO_SDK': '1'})
Expand Down