https://llvm.org/bugs/show_bug.cgi?id=30391
Bug ID: 30391 Summary: GCC produces ABI-incompatible libc++ dylibs Product: libc++ Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: unassignedclangb...@nondot.org Reporter: e...@efcs.ca CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com Classification: Unclassified GCC handles _LIBCPP_INLINE_VISIBILITY differently than Clang. In particular when the attributes are applied to symbols which are externally instantiated. For example in the reproducer below Clang will emit both 'foo' and 'bar' with default visibility while GCC only emits a non-hidden 'foo'. // RUN: g++ -std=c++11 -shared -O3 test.cpp && sym_extract.py a.out // RUN: clang++ -std=c++11 -shared -O3 test.cpp && sym_extract.py a.out template <class T> struct Foo { void foo(); void bar(); }; template <class T> void Foo<T>::foo() {} template <class T> inline __attribute__((visibility("hidden"), always_inline)) void Foo<T>::bar() {} template struct Foo<int>; One way to fix this would be to add _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY which is defined as __attribute__((visibility("default"), always_inline)). -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs