Skip to content

Conversation

@sbc100
Copy link
Member

@sbc100 sbc100 commented Mar 22, 2024

This change removes the "minimal" mode from LegalizeJSInterface which was added in #1883.

The idea behind this change was to avoid legalizing most function except those we know that JS will be calling. The idea was that for dynamic linking we always want the non-legalized version to be shared between wasm module. These days we solve this problem in a different way with the legalize-js-interface-export-originals which exports the original functions alongside the legalized ones. Emscripten then always prefers the $orig functions when doing dynamic linking.

@sbc100 sbc100 requested a review from kripken March 22, 2024 23:12
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm if Emscripten tests pass

sbc100 added a commit to sbc100/emscripten that referenced this pull request Mar 22, 2024
This change removes the "minimal" mode from `LegalizeJSInterface`
which was added in #1883.

The idea behind this change was to avoid legalizing most function except
those we know that JS will be calling.  The idea was that for dynamic
linking we always want the non-legalized version to be shared between
wasm module.  These days we solve this problem in a different way with
the `legalize-js-interface-export-originals` which exports the original
functions alongside the legalized ones.  Emscripten then always
prefers the `$orig` functions when doing dynamic linking.
@sbc100
Copy link
Member Author

sbc100 commented Mar 22, 2024

lgtm if Emscripten tests pass

Everything except the one testing for this specific behaviour: emscripten-core/emscripten#21599

@sbc100 sbc100 force-pushed the minimal_legalize branch from 8875781 to 1a27447 Compare March 22, 2024 23:51
@sbc100 sbc100 merged commit 81b8497 into main Mar 23, 2024
@sbc100 sbc100 deleted the minimal_legalize branch March 23, 2024 00:26
sbc100 added a commit to emscripten-core/emscripten that referenced this pull request Mar 23, 2024
@kripken
Copy link
Member

kripken commented Aug 1, 2024

@sbc100 This PR is cited as the reason for an Emscripten test being disabled:

https://github.com/emscripten-core/emscripten/blob/ea35c8cde53d4691504436300493d60b49ff3744/test/test_other.py#L8810-L8821

Do we still need to disable it / need that test?

@sbc100
Copy link
Member Author

sbc100 commented Aug 2, 2024

Yes, it looks like we can re-enable that test, but also it looks like we need to first ensure we have names for these stub functions: #6806

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants