When building aws-c-common (and the other AWS C libraries), we pass -fvisibility=hidden, but only when building a shared library (since #516). I am proposing to pass it always.
Use Case
Compiling with -fvisibility=hidden makes sense in static libraries too (see related CMake policy). There has been an issue where the interaction between two Python wheels with their own statically linked copy of the AWS SDK resulted in unexplained failures, because both AWS SDKs exported private symbols, which was fixed by forcing the AWS libraries in one of the wheels to compile with -fvisiblity=hidden.
The AWS SDK is already going to always enable-fvisiblity=hidden and so does s2n for non-testing builds. This issue tracks doing the same for the AWS C libraries.
Proposed Solution
Revert to the behavior before #516, or follow s2n's example and pass -fvisibility=hidden always unless we have enabled testing and are building a shared library.
Other Information
No response
Acknowledgements
[X] I may be able to implement this feature request
Describe the feature
When building
aws-c-common
(and the other AWS C libraries), we pass-fvisibility=hidden
, but only when building a shared library (since #516). I am proposing to pass it always.Use Case
Compiling with
-fvisibility=hidden
makes sense in static libraries too (see related CMake policy). There has been an issue where the interaction between two Python wheels with their own statically linked copy of the AWS SDK resulted in unexplained failures, because both AWS SDKs exported private symbols, which was fixed by forcing the AWS libraries in one of the wheels to compile with-fvisiblity=hidden
.The AWS SDK is already going to always enable
-fvisiblity=hidden
and so does s2n for non-testing builds. This issue tracks doing the same for the AWS C libraries.Proposed Solution
Revert to the behavior before #516, or follow s2n's example and pass
-fvisibility=hidden
always unless we have enabled testing and are building a shared library.Other Information
No response
Acknowledgements