Skip to content

Conversation

@rgommers
Copy link
Member

This avoids exporting symbols from static libraries in the extension modules, which was happening for compilers that support GNU visibility attributes but not the linker script (e.g., Clang on macOS).

The gain in binary size for a wheel on macOS is only 0.06%, but every little bit helps.

@lucascolley lucascolley added the maintenance Items related to regular maintenance tasks label Apr 14, 2024
@lucascolley lucascolley added this to the 1.14.0 milestone Apr 14, 2024
Copy link
Contributor

@thalassemia thalassemia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this also be applied to the static libraries in scipy/optimize/_highs?

@rgommers
Copy link
Member Author

Can this also be applied to the static libraries in scipy/optimize/_highs?

It can; I left that out on purpose because those static libraries are being removed in gh-19255, so touching them here will only yield a merge conflict.

@rgommers
Copy link
Member Author

I re-ran the one CI job that timed out on Cirrus, that was a flake - all green now.

This avoids exporting symbols from static libraries in the extension
modules, which was happening for compilers that support GNU visibility
attributes but not the linker script (e.g., Clang on macOS).
@thalassemia thalassemia force-pushed the staticlibs-hiddenvisibility branch from 18bd415 to be0a047 Compare April 15, 2024 16:35
Copy link
Contributor

@thalassemia thalassemia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased on main to resolve the merge conflict. Otherwise LGTM, so I'll merge as soon as the CI runs finish.

@thalassemia thalassemia merged commit 8b85ae5 into scipy:main Apr 15, 2024
@rgommers rgommers deleted the staticlibs-hiddenvisibility branch April 15, 2024 18:43
@rgommers
Copy link
Member Author

Followed up with a similar change to libnpymath in numpy/numpy#26286, after which special._ufuncs is clean (only a single symbol exported now on macOS, PyInit__ufuncs).

rgommers added a commit to rgommers/scipy that referenced this pull request Jun 7, 2024
This is a follow-up to scipygh-20477, where HiGHS wasn't touched on
purpose to avoid a merge conflict in another PR.

Closes scipygh-20256
rgommers added a commit to rgommers/scipy that referenced this pull request Jun 7, 2024
This is a follow-up to scipygh-20477, where HiGHS wasn't touched on
purpose to avoid a merge conflict in another PR.

Minor useful side benefit: it shrinks the size of `_highs_wrapper.so`
by 0.4%

Closes scipygh-20256
tylerjereddy pushed a commit to tylerjereddy/scipy that referenced this pull request Jun 10, 2024
This is a follow-up to scipygh-20477, where HiGHS wasn't touched on
purpose to avoid a merge conflict in another PR.

Minor useful side benefit: it shrinks the size of `_highs_wrapper.so`
by 0.4%

Closes scipygh-20256
tylerjereddy pushed a commit to tylerjereddy/scipy that referenced this pull request Jun 10, 2024
This is a follow-up to scipygh-20477, where HiGHS wasn't touched on
purpose to avoid a merge conflict in another PR.

Minor useful side benefit: it shrinks the size of `_highs_wrapper.so`
by 0.4%

Closes scipygh-20256

[ci skip] [skip ci] [skip circle]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build issues Issues with building from source, including different choices of architecture, compilers and OS maintenance Items related to regular maintenance tasks Meson Items related to the introduction of Meson as the new build system for SciPy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants