[llvm] Initial changes for llvm shared library build using explicit visibility annotations (PR #96630)

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 15:34:54 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__)
----------------
compnerd wrote:

Clang should support this under the GNU standard. Can you add a note on why this condition is needed?

https://github.com/llvm/llvm-project/pull/96630


More information about the llvm-commits mailing list