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

Consider enabling -fvisibility=hidden when building a static library. #1142

Open
1 of 2 tasks
teo-tsirpanis opened this issue Aug 2, 2024 · 1 comment · May be fixed by #1143
Open
1 of 2 tasks

Consider enabling -fvisibility=hidden when building a static library. #1142

teo-tsirpanis opened this issue Aug 2, 2024 · 1 comment · May be fixed by #1143
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue

Comments

@teo-tsirpanis
Copy link
Contributor

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

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@teo-tsirpanis teo-tsirpanis added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Aug 2, 2024
@jmklix
Copy link
Member

jmklix commented Aug 5, 2024

Thanks @teo-tsirpanis for this suggestion. This is something that we would like to do, but I don't have a timeline for when this will get implemented

@jmklix jmklix added p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants