Skip to content

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 8, 2025

My second or third attempt at this now :)

Fixes: #12682

@sbc100 sbc100 force-pushed the main_module_static_v2 branch 2 times, most recently from cd1b8ce to e8f95c7 Compare October 22, 2025 19:23
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 22, 2025
Also, add an assertion to dynCall.

Split out from emscripten-core#25522.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 22, 2025
Also, add an assertion to dynCall.

Split out from emscripten-core#25522.
@sbc100 sbc100 force-pushed the main_module_static_v2 branch 2 times, most recently from 8c32591 to d40087a Compare October 22, 2025 20:17
@sbc100 sbc100 requested review from dschuff and kripken October 22, 2025 20:22
@sbc100
Copy link
Collaborator Author

sbc100 commented Oct 22, 2025

I still need to get some stats on the benefits of this, but that tests are all now passing so I think this should be good to review now.

An open question is: What do we do about -sRELOCTABLE. Once this change lands we will have almost not testing on this flag. We do have plan to remove it: #25262. One option is to remove -sRELOCATABLE before this change lands?

sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 22, 2025
Also, add an assertion to dynCall.

Split out from emscripten-core#25522.
@sbc100 sbc100 force-pushed the main_module_static_v2 branch from d40087a to 6008112 Compare October 22, 2025 20:49
@kripken
Copy link
Member

kripken commented Oct 22, 2025

Yeah, I see what you mean, removing RELOCATABLE first would simplify this a little. I don't have a preference though.

I do see some tests still fail here though?

sbc100 added a commit that referenced this pull request Oct 22, 2025
Also, add an assertion to dynCall.

Split out from #25522.
@sbc100 sbc100 force-pushed the main_module_static_v2 branch from 6008112 to 57b299d Compare October 23, 2025 00:09
The main advantage here is that main module no longer requires
relocation entries for symbols defined locally.

Fixes: emscripten-core#12682
@sbc100 sbc100 force-pushed the main_module_static_v2 branch from 57b299d to 9c4dc95 Compare October 23, 2025 17:04
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.

Stop building MAIN_MODULE with RELOCATABLE (-fPIC)

2 participants