Skip to content

Add asyncify-export-globals argument#8074

Merged
sbc100 merged 1 commit into
mainfrom
asyncify_export_globals
Dec 1, 2025
Merged

Add asyncify-export-globals argument#8074
sbc100 merged 1 commit into
mainfrom
asyncify_export_globals

Conversation

@sbc100
Copy link
Copy Markdown
Member

@sbc100 sbc100 commented Nov 26, 2025

In the past emscripten would build the main module as relocatable, but these days we build it statically and in that case it makes sense for the main module to define and export these globals, rather than defining them in JS.

@sbc100 sbc100 requested a review from kripken November 26, 2025 23:10
@sbc100 sbc100 force-pushed the asyncify_export_globals branch 3 times, most recently from a0f5fb1 to 2b9ba4a Compare November 26, 2025 23:34
@sbc100 sbc100 requested a review from dschuff November 26, 2025 23:44
sbc100 added a commit to sbc100/emscripten that referenced this pull request Nov 26, 2025
@sbc100 sbc100 requested a review from tlively November 26, 2025 23:46
@sbc100 sbc100 enabled auto-merge (squash) November 27, 2025 00:07
Comment thread src/passes/Asyncify.cpp
Comment thread src/passes/Asyncify.cpp Outdated
@sbc100 sbc100 force-pushed the asyncify_export_globals branch 2 times, most recently from ebbfd5f to dad5fc6 Compare November 30, 2025 23:48
Comment thread src/passes/Asyncify.cpp Outdated
//
// In addition, there are arguments for controlling the import/export of the
// internal globals used by Asyncify. These can be useful in dynamic linking.
// By default these globals are are internal and neither imported, not exported.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
// By default these globals are are internal and neither imported, not exported.
// By default these globals are are internal and neither imported nor exported.

Copy link
Copy Markdown
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 % comments

Comment thread src/passes/Asyncify.cpp Outdated
@sbc100 sbc100 force-pushed the asyncify_export_globals branch from dad5fc6 to f20aa5b Compare December 1, 2025 17:08
In the past emscripten would build the main module as relocatable, but
these days we build it statically and in that case it makes sense for
the main module to define and export these globals, rather than defining
them in JS.
@sbc100 sbc100 force-pushed the asyncify_export_globals branch from f20aa5b to 5e045d9 Compare December 1, 2025 17:08
@sbc100 sbc100 disabled auto-merge December 1, 2025 17:08
@sbc100 sbc100 merged commit ecf25d6 into main Dec 1, 2025
10 checks passed
@sbc100 sbc100 deleted the asyncify_export_globals branch December 1, 2025 17:09
sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 1, 2025
sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 1, 2025
sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 2, 2025
sbc100 added a commit to emscripten-core/emscripten that referenced this pull request Dec 2, 2025
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.

2 participants