Enable real dynamic linking with -shared by default#25930
Conversation
655b473 to
e01726b
Compare
6e4f78f to
3b0addc
Compare
3b9f050 to
d2bc4e4
Compare
dbf81cc to
2a061bd
Compare
d43b884 to
19b4b57
Compare
I actually ended up leaving the cmake |
|
OK, I think this change is in pretty good shape now |
-shared by default
In particular, mention the `FAKE_DYLIBS` setting. This is important especially since we are about the change the default behavior. See emscripten-core#25930
Good idea. I started by updated the docs here: #26976. I can then include another update with this PR when it lands. |
In particular, mention the `FAKE_DYLIBS` setting. This is important especially since we are about the change the default behavior. See emscripten-core#25930
In particular, mention the `FAKE_DYLIBS` setting. This is important especially since we are about the change the default behavior. See emscripten-core#25930
|
OK, this change now has corresponding update to @kripken was I able to persuade you this is a direction worth going in? |
|
Yes, I'm not opposed to the direction. I do worry about some breakage, but you're probably right that there are few users of this feature, and eventually this might lead to simplifications. |
|
Any last concerns before landing this? |
This should have been part of emscripten-core#25930
This should have been part of #25930
a673118 to
8d7ffbb
Compare
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`.
|
OK, cmake issue is now resolved I believe. |
| 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']) |
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.
There was a problem hiding this comment.
I split out a change to remove this redundant test: #26986
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.