You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should not set CMAKE_CXX_VISIBILITY_PRESET to hidden for llvm Targets
Using this feature is error prone and interacts in subtle ways with the LLVM
codebase.
As an example, llvm::Any::TypeId::Id relies on the uniqueness of the address of a
static variable defined in a template function. hidden visibility implies vague
linkage for that variable, which does not guarantee the uniqueness of the address
across a binary and a shared library. This totally breaks the implementation of
llvm::Any.
Extended Description
We should not set CMAKE_CXX_VISIBILITY_PRESET to hidden for llvm Targets
Using this feature is error prone and interacts in subtle ways with the LLVM
codebase.
As an example, llvm::Any::TypeId::Id relies on the uniqueness of the address of a
static variable defined in a template function. hidden visibility implies vague
linkage for that variable, which does not guarantee the uniqueness of the address
across a binary and a shared library. This totally breaks the implementation of
llvm::Any.
See https://gcc.gnu.org/wiki/Visibility and https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html
for more information on that topic.
Proposed patch: https://reviews.llvm.org/D101972
The text was updated successfully, but these errors were encountered: