-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3429,13 +3429,12 @@ Default value: false | |||||
| FAKE_DYLIBS | ||||||
| =========== | ||||||
|
|
||||||
| This setting changes the behaviour of the ``-shared`` flag. The default | ||||||
| setting of ``true`` means the ``-shared`` flag actually produces a normal | ||||||
| object file (i.e. ``ld -r``). Setting this to false will cause ``-shared`` | ||||||
| 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 | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| produces a normal object file (i.e. ``ld -r``). The default behaviour is that | ||||||
| `-shared` is the as :ref:`SIDE_MODULE`. | ||||||
|
|
||||||
| Default value: true | ||||||
| Default value: false | ||||||
|
|
||||||
| .. _deprecated-settings: | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4047,8 +4047,8 @@ def dylink_testf(self, main, side=None, expected=None, force_c=False, main_cflag | |||||
|
|
||||||
| shutil.move(so_file, so_file + '.orig') | ||||||
|
|
||||||
| # 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` | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| flags = ['-shared', '-fPIC'] | ||||||
| if isinstance(side, list): | ||||||
| # side is just a library | ||||||
| self.run_process([EMCC] + side + self.get_cflags() + flags + ['-o', so_file]) | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -170,6 +170,9 @@ def lld_flags_for_executable(external_symbols): | |
| stub = create_stub_object(external_symbols) | ||
| cmd.append(stub) | ||
|
|
||
| if not settings.FAKE_DYLIBS: | ||
| cmd.append('-Bdynamic') | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before this was just for main module - why is it different?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| if not settings.ERROR_ON_UNDEFINED_SYMBOLS: | ||
| cmd.append('--import-undefined') | ||
|
|
||
|
|
@@ -208,7 +211,6 @@ def lld_flags_for_executable(external_symbols): | |
| c_exports = [e for e in c_exports if e not in external_symbols] | ||
| c_exports += settings.REQUIRED_EXPORTS | ||
| if settings.MAIN_MODULE: | ||
| cmd.append('-Bdynamic') | ||
| c_exports += side_module_external_deps(external_symbols) | ||
| for export in c_exports: | ||
| if settings.ERROR_ON_UNDEFINED_SYMBOLS: | ||
|
|
||
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
CMakeGenericSystemmodule initializes the property toTRUE. It doesn't need to be set here.