Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 8, 2025

This is needed by dynamic linking since GOT entries are all imported as mutable globals.

The net effect of this is that you cannot actually target the oldest version of safari that we support (12) and with dynamically linked programs. Specifying -sLEGACY_VM_SUPPORT will give you safari 13.1 instead of 12 if you also using -sMAIN_MODULE.

@sbc100 sbc100 changed the title Add MUTABLE_GLOBALS to feature_matrix Add MUTABLE_GLOBALS to feature_matrix Oct 8, 2025
@sbc100 sbc100 requested review from dschuff and kripken October 8, 2025 23:48
@sbc100 sbc100 force-pushed the mutable_global_feature branch from 2a8d1b0 to 87a3b6e Compare October 9, 2025 00:16
This is needed by dynamic linking since GOT entries are all imported as
mutable globals.

The net effect of this is that you cannot actually target the oldest
version of safari that we support (12) and with dynamically linked
programs.  Specifying `-sLEGACY_VM_SUPPORT` will give you safari 13.1
instead of 12 if you also using `-sMAIN_MODULE`.
@sbc100 sbc100 force-pushed the mutable_global_feature branch from 87a3b6e to 90bc236 Compare October 9, 2025 00:19
enable_feature(Feature.BULK_MEMORY, 'pthreads')
elif settings.WASM_WORKERS or settings.SHARED_MEMORY:
enable_feature(Feature.BULK_MEMORY, 'shared-mem')
if settings.RELOCATABLE:
Copy link
Member

Choose a reason for hiding this comment

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

Were you not hoping to remove this setting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes I will replace this with MAIN_MODULE as part of that change.

@sbc100 sbc100 merged commit ac45ded into emscripten-core:main Oct 9, 2025
33 checks passed
@sbc100 sbc100 deleted the mutable_global_feature branch October 9, 2025 16:17
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