Skip to content
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

Enable "hidden" visibility to reduce wheel size #15

Open
blowekamp opened this issue Jan 25, 2017 · 2 comments
Open

Enable "hidden" visibility to reduce wheel size #15

blowekamp opened this issue Jan 25, 2017 · 2 comments

Comments

@blowekamp
Copy link
Member

The current wheel size is nearly 50MB for 64-bit linux. This is the size limit of PyPi. With correctly specified hidden visibility flags, the size can be reduce to ~38MB.

Previous release were manually configured with:

  CMAKE_CXX_FLAGS:STRING=-fvisibility=hidden -fvisibility-inlines-hidden
  CMAKE_C_FLAGS:STRING=-fvisibility=hidden

The newer strategy has been to use the related CMake visibility presets. Correctness with the recent changes in ITK and how SimpleITK interacts with these properties needs to be tests and reviewed in the current SimpleITK master.

It is planned that explicitly setting the following would be best:

 -DCMAKE_VISIBILITY_INLINES_HIDDEN:BOOL=ON
 -DCMAKE_C_VISIBILITY_PRESET:STRING=hidden
 -DCMAKE_CXX_VISIBILITY_PRESET:STRING=hidden

This is under the assumption that the packaging only produces a single shared library.

@blowekamp
Copy link
Member Author

Recent commits in SimpleITK should improve hiding of symbols:
SimpleITK/SimpleITK@70470a7

Need to update the package version and determine the size of the package distribution.

@blowekamp
Copy link
Member Author

Additionally, the Python Library was not being stripped of symbols.
Pull request #19 adresses the stripping issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant