-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Disable FAKE_DYLIBS by default #25930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
655b473 to
e01726b
Compare
|
|
||
| set(CMAKE_CROSSCOMPILING TRUE) | ||
| set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) | ||
| set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bradking should I just delete line instead? (i.e. does this default to true?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the CMakeGenericSystem module initializes the property to TRUE. It doesn't need to be set here.
e01726b to
6e4f78f
Compare
This means that `-shared` will now produce a dynamic library by default. If you want the old behaviour you now need `-sFAKE_DYLIBS`.
6e4f78f to
3b0addc
Compare
| to behave like :ref:`SIDE_MODULE` and produce and dynamically linked | ||
| library. | ||
| This setting changes the behaviour of the ``-shared`` flag. When set to true | ||
| you get the old emscripten behaivour where the ``-shared`` flag actually |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| you get the old emscripten behaivour where the ``-shared`` flag actually | |
| you get the old emscripten behaviour where the ``-shared`` flag actually |
| cmd.append(stub) | ||
|
|
||
| if not settings.FAKE_DYLIBS: | ||
| cmd.append('-Bdynamic') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this was just for main module - why is it different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. yes I guess this part of the change would be removing the need for -sMAIN_MODULE (i.e. implicitly building a main module when dynamic libraries are present). Maybe that should be left for a followup.
dschuff
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder what would happen if we tested this with Binaryen. it doesn't seem prepared to force the Emscripten build to be static (assuming that's the behavior we actually want).
|
|
||
| # Verify that building with -sSIDE_MODULE is essentailly the same as building with `-shared -fPIC -sFAKE_DYLIBS=0`. | ||
| flags = ['-shared', '-fPIC', '-sFAKE_DYLIBS=0'] | ||
| # Verify that building with -sSIDE_MODULE is essentailly the same as building with `-shared -fPIC` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Verify that building with -sSIDE_MODULE is essentailly the same as building with `-shared -fPIC` | |
| # Verify that building with -sSIDE_MODULE is essentially the same as building with `-shared -fPIC` |
This means that
-sharedwill now produce a dynamic library by default.If you want the old behaviour you now need
-sFAKE_DYLIBS.