Enable real dynamic linking with -shared by default - #25930
Merged
Conversation
sbc100
force-pushed
the
shared_flag_part2
branch
from
December 11, 2025 00:39
655b473 to
e01726b
Compare
sbc100
commented
Dec 11, 2025
sbc100
force-pushed
the
shared_flag_part2
branch
2 times, most recently
from
December 11, 2025 00:49
6e4f78f to
3b0addc
Compare
kripken
reviewed
Dec 11, 2025
sbc100
force-pushed
the
shared_flag_part2
branch
3 times, most recently
from
May 12, 2026 04:13
3b9f050 to
d2bc4e4
Compare
sbc100
commented
May 12, 2026
sbc100
force-pushed
the
shared_flag_part2
branch
2 times, most recently
from
May 14, 2026 01:07
dbf81cc to
2a061bd
Compare
sbc100
added a commit
that referenced
this pull request
May 14, 2026
sbc100
force-pushed
the
shared_flag_part2
branch
4 times, most recently
from
May 15, 2026 19:07
d43b884 to
19b4b57
Compare
Collaborator
Author
I actually ended up leaving the cmake |
Collaborator
Author
|
OK, I think this change is in pretty good shape now |
-shared by default
Collaborator
Author
sbc100
force-pushed
the
shared_flag_part2
branch
3 times, most recently
from
May 20, 2026 20:41
a673118 to
8d7ffbb
Compare
bradking
reviewed
May 20, 2026
sbc100
force-pushed
the
shared_flag_part2
branch
2 times, most recently
from
May 20, 2026 20:58
b594e80 to
efe9645
Compare
Collaborator
Author
|
OK, cmake issue is now resolved I believe. |
kripken
reviewed
May 20, 2026
kripken
reviewed
May 20, 2026
| self.run_process([EMCC, 'libdir/libfile.c', '-sFAKE_DYLIBS', '-shared', '-fPIC', '-o', 'libdir/libfile.so' + lib_suffix]) | ||
| # Build libother and dynamically link it to libfile | ||
| self.run_process([EMCC, '-Llibdir', 'libdir/libother.c'] + link_flags + ['-shared', '-o', 'libdir/libother.so']) | ||
| self.run_process([EMCC, '-Llibdir', 'libdir/libother.c'] + link_flags + ['-sFAKE_DYLIBS', '-shared', '-fPIC', '-o', 'libdir/libother.so']) |
Member
There was a problem hiding this comment.
Here I think we do need a comment on the new flag? I don't see one in this function.
Collaborator
Author
There was a problem hiding this comment.
I split out a change to remove this redundant test: #26986
This change essentially disables `FAKE_DYLIBS` by default, which in turn means `-shared` will now produce dynamic libraries by default. If you want the old behaviour you now need `-sFAKE_DYLIBS`.
sbc100
disabled auto-merge
May 21, 2026 22:04
hoodmane
added a commit
to pyodide/pyodide
that referenced
this pull request
Jul 28, 2026
hoodmane
added a commit
to pyodide/pyodide
that referenced
this pull request
Jul 28, 2026
hoodmane
added a commit
to pyodide/pyodide
that referenced
this pull request
Jul 29, 2026
This file contains hidden or 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
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 change essentially disables
FAKE_DYLIBSby default, which inturn means
-sharedwill now produce dynamic libraries by default.If you want the old behaviour you now need
-sFAKE_DYLIBS.