[llvm] e0aa2ea - Revert "Only define LLVM_EXTERNAL_VISIBILITY when building libLLVM dylib"

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 14 10:24:36 PST 2021


Author: Mehdi Amini
Date: 2021-12-14T18:23:43Z
New Revision: e0aa2ea661fbdd6443a0aa36803ca34152e32a52

URL: https://github.com/llvm/llvm-project/commit/e0aa2ea661fbdd6443a0aa36803ca34152e32a52
DIFF: https://github.com/llvm/llvm-project/commit/e0aa2ea661fbdd6443a0aa36803ca34152e32a52.diff

LOG: Revert "Only define LLVM_EXTERNAL_VISIBILITY when building libLLVM dylib"

This reverts commit 71e97ad35b2abcc89cc8ff471a3eb404120cf208.

The MLIR tests using the dylib are broken.

https://lab.llvm.org/buildbot/#/builders/61/builds/18785

Added: 
    

Modified: 
    llvm/include/llvm/Config/llvm-config.h.cmake
    llvm/include/llvm/Support/Compiler.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Config/llvm-config.h.cmake b/llvm/include/llvm/Config/llvm-config.h.cmake
index a182f835c0f26..4493bb65d4442 100644
--- a/llvm/include/llvm/Config/llvm-config.h.cmake
+++ b/llvm/include/llvm/Config/llvm-config.h.cmake
@@ -103,7 +103,4 @@
 /* Define if the xar_open() function is supported on this platform. */
 #cmakedefine LLVM_HAVE_LIBXAR ${LLVM_HAVE_LIBXAR}
 
-/* Define if building libLLVM shared library */
-#cmakedefine LLVM_BUILD_LLVM_DYLIB
-
 #endif

diff  --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h
index abb0dab16cbc1..c5318137ed3d0 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -121,16 +121,12 @@
 /// On PE/COFF targets, library visibility is the default, so this isn't needed.
 ///
 /// LLVM_EXTERNAL_VISIBILITY - classes, functions, and variables marked with
-/// this attribute will be made public and visible outside the libLLVM dynamic
-/// library.
+/// this attribute will be made public and visible outside of any shared library
+/// they are linked in to.
 #if __has_attribute(visibility) && !defined(__MINGW32__) &&                    \
     !defined(__CYGWIN__) && !defined(_WIN32)
 #define LLVM_LIBRARY_VISIBILITY __attribute__ ((visibility("hidden")))
-#if defined(LLVM_BUILD_LLVM_DYLIB)
-#define LLVM_EXTERNAL_VISIBILITY __attribute__((visibility("default")))
-#else
-#define LLVM_EXTERNAL_VISIBILITY
-#endif
+#define LLVM_EXTERNAL_VISIBILITY __attribute__ ((visibility("default")))
 #else
 #define LLVM_LIBRARY_VISIBILITY
 #define LLVM_EXTERNAL_VISIBILITY


        


More information about the llvm-commits mailing list