[llvm] Initial changes for llvm shared library build using explicit visibility annotations (PR #96630)
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 22:56:15 PDT 2024
================
@@ -114,7 +114,8 @@
/// this attribute will be made public and visible outside of any shared library
/// they are linked in to.
-#if LLVM_HAS_CPP_ATTRIBUTE(gnu::visibility)
+#if LLVM_HAS_CPP_ATTRIBUTE(gnu::visibility) && defined(__GNUC__) && \
+ !defined(__clang__)
----------------
tstellar wrote:
Clang supports it, but IIRC the rules about where the function declaration the c++11 style attributes can be placed is different between gcc in clang. See the comments here:
https://github.com/tstellar/template-visibility/blob/testing/templates.h
https://github.com/llvm/llvm-project/pull/96630
More information about the llvm-commits
mailing list