Skip to content

Commit 91fefbf

Browse files
authored
Fix dylink reversed tests in -sSTRICT mode (#25822)
Fixes: #25809
1 parent 8857416 commit 91fefbf

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ jobs:
776776
omitexports0.test_asyncify_longjmp
777777
omitexports0.test_emscripten_api
778778
strict.test_no_declare_asm_module_exports
779+
strict.test_dylink_global_inits_reversed
779780
"
780781
test-modularize-instance:
781782
executor: focal

tools/emscripten.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,12 @@ def report_missing_exports(js_symbols):
233233
# maximum compatibility.
234234
return
235235

236-
if settings.EXPECT_MAIN and 'main' not in settings.WASM_EXPORTS and '__main_argc_argv' not in settings.WASM_EXPORTS:
237-
# For compatibility with the output of wasm-ld we use the same wording here in our
238-
# error message as if wasm-ld had failed.
239-
exit_with_error('entry symbol not defined (pass --no-entry to suppress): main')
236+
if settings.EXPECT_MAIN:
237+
all_exports = settings.WASM_EXPORTS + settings.SIDE_MODULE_EXPORTS
238+
if 'main' not in all_exports and '__main_argc_argv' not in all_exports:
239+
# For compatibility with the output of wasm-ld we use the same wording here in our
240+
# error message as if wasm-ld had failed.
241+
exit_with_error('entry symbol not defined (pass --no-entry to suppress): main')
240242

241243

242244
# Test if the parentheses at body[openIdx] and body[closeIdx] are a match to

0 commit comments

Comments
 (0)