New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make_export_wrappers: Limit module exports to EXPORTED_FUNCTIONS #18564
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sbc100
force-pushed
the
limit_exports
branch
2 times, most recently
from
January 20, 2023 16:53
585655d
to
e00c0b1
Compare
sbc100
force-pushed
the
limit_exports
branch
6 times, most recently
from
January 20, 2023 22:44
f0e0047
to
b70e491
Compare
sbc100
added a commit
that referenced
this pull request
Jan 20, 2023
Rather than relying on them being exported on the Module object we can just can these function directly. The deps here already exist in deps_info.py, but adding them here increases robustness. This change was split out from #18564 (which disabled the exporting of all symbols by default on the Module object).
kripken
reviewed
Jan 20, 2023
@@ -584,6 +584,28 @@ function isDynamicDynCall(node) { | |||
); | |||
} | |||
|
|||
function isExportWrapperFunction(f) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment with some examples of what this detects.
sbc100
added a commit
that referenced
this pull request
Jan 20, 2023
…18570) Rather than relying on them being exported on the Module object we can just can these function directly. The deps here already exist in deps_info.py, but adding them here increases robustness. This change was split out from #18564 (which disabled the exporting of all symbols by default on the Module object).
kripken
approved these changes
Jan 21, 2023
This is code size win in pretty much all cases since thee are always a few wasm exports that don't need to be set on the module object.
manxorist
added a commit
to OpenMPT/openmpt
that referenced
this pull request
Jul 14, 2023
…g malloc and free by default (see <emscripten-core/emscripten#18564>). As memory needs to get transferred to and from libopenmpt in all use cases, these really should get exported. Revert Emscripten change by exporting these function manually. Fixes <#16>. Patch-by: Essem <smswessem@gmail.com> git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@19469 56274372-70c3-4bfc-bfc3-4c3a0b034d27
manxorist
added a commit
to OpenMPT/openmpt
that referenced
this pull request
Jul 14, 2023
[Fix] build: Makefile: Emscripten: Emscripten 3.1.31 stopped exporting malloc and free by default (see <emscripten-core/emscripten#18564>). As memory needs to get transferred to and from libopenmpt in all use cases, these really should get exported. Revert Emscripten change by exporting these function manually. Fixes <#16>. Patch-by: Essem <smswessem@gmail.com> ........ git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.31@19470 56274372-70c3-4bfc-bfc3-4c3a0b034d27
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is code size win in pretty much all cases since there are always a few wasm exports that don't need to be set on the module object.