Skip to content

Use HIDE_FROM_ABI in the dylib #81652

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

Open
mordante opened this issue Feb 13, 2024 · 1 comment
Open

Use HIDE_FROM_ABI in the dylib #81652

mordante opened this issue Feb 13, 2024 · 1 comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Comments

@mordante
Copy link
Member

mordante commented Feb 13, 2024

I think this should be HIDE_FROM_ABI. Otherwise, we'll have potential ODR violations when mixing different versions of libc++ via static archives. This seems to be a widespread pre-existing problem in the library after a quick survey.

This would force you to define it in the header because HIDE_FROM_ABI is ALWAYS_INLINE on GCC. I think it would be acceptable to ignore this issue until we've cleaned that up, since I feel like this is a very deep can of worms to open.

Originally posted by @ldionne in #74928 (comment)

@mordante mordante added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. and removed new issue labels Feb 13, 2024
@philnik777
Copy link
Contributor

I'm pretty sure we've had this discussion before, but how could you ever link multiple static archives? They would provide the same public symbol multiple times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

No branches or pull requests

2 participants