Fix: When symbol is both imported and exported, don't drop import#26356
Fix: When symbol is both imported and exported, don't drop import#26356hoodmane wants to merge 4 commits intoemscripten-core:mainfrom
Conversation
2ef32d4 to
6ab4594
Compare
This fixes wrapping syscalls with -sMAIN_MODULE and -sEXPORT_ALL. Resolves issue 26355.
6ab4594 to
441ec3c
Compare
sbc100
left a comment
There was a problem hiding this comment.
Can we create a test case for this?
Kind sad we have to pipe this potentially-large array of string to the JS compiler, but maybe there is no other way to achieve this.
src/jsifier.mjs
Outdated
|
|
||
| // if the function was implemented in compiled code, there is no need to | ||
| // include the js version | ||
| if (WASM_EXPORTS.has(symbol) && !DEFAULT_LIBRARY_FUNCS_TO_INCLUDE.includes(symbol)) { |
There was a problem hiding this comment.
Hmm.. i wonder if we might still need DEFAULT_LIBRARY_FUNCS_TO_INCLUDE ?
There was a problem hiding this comment.
Using DEFAULT_LIBRARY_FUNCS_TO_INCLUDE here broke some of the -O0 tests for reasons I don't completely understand -- something about missing makeInvalidEarlyAccess() settings. Using WASM_IMPORTS instead fixed it.
Added I can't reproduce the |
This fixes wrapping syscalls with -sMAIN_MODULE and -sEXPORT_ALL. Resolves #26355.