[llvm] Initial changes for llvm shared library build using explicit visibility annotations (PR #96630)
Thomas Fransham via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 08:11:41 PDT 2024
================
@@ -815,22 +815,36 @@ endif()
if(MSVC)
option(LLVM_BUILD_LLVM_C_DYLIB "Build LLVM-C.dll (Windows only)" ON)
- # Set this variable to OFF here so it can't be set with a command-line
- # argument.
- set (LLVM_LINK_LLVM_DYLIB OFF)
+ if(NOT LLVM_BUILD_LLVM_DYLIB_VIS)
+ # Set this variable to OFF here so it can't be set with a command-line
+ # argument.
+ set (LLVM_LINK_LLVM_DYLIB OFF)
+ endif()
if (BUILD_SHARED_LIBS)
message(FATAL_ERROR "BUILD_SHARED_LIBS options is not supported on Windows.")
endif()
-else()
- option(LLVM_LINK_LLVM_DYLIB "Link tools against the libllvm dynamic library" OFF)
+ else()
option(LLVM_BUILD_LLVM_C_DYLIB "Build libllvm-c re-export library (Darwin only)" OFF)
+endif()
+
+if(NOT MSVC OR LLVM_BUILD_LLVM_DYLIB_VIS)
+ option(LLVM_LINK_LLVM_DYLIB "Link tools against the libllvm dynamic library" OFF)
----------------
fsfod wrote:
@petrhosek I pushed some changes to try and use it if you want to take a look.
https://github.com/llvm/llvm-project/pull/96630
More information about the llvm-commits
mailing list