Skip to content

Commit

Permalink
Another attempt too make it work
Browse files Browse the repository at this point in the history
  • Loading branch information
fsfod committed Aug 8, 2024
1 parent e0461dd commit 1a98960
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -824,21 +824,25 @@ if(MSVC)
option(LLVM_BUILD_LLVM_C_DYLIB "Build libllvm-c re-export library (Darwin only)" OFF)
endif()

set(CAN_BUILD_LLVM_DYLIB Off)
if(NOT MSVC OR LLVM_BUILD_LLVM_DYLIB_VIS)
set(CAN_BUILD_LLVM_DYLIB On)
endif()

CMAKE_DEPENDENT_OPTION(LLVM_LINK_LLVM_DYLIB "Link tools against the libllvm dynamic library" OFF
"CAN_BUILD_LLVM_DYLIB" OFF)

set(LLVM_BUILD_LLVM_DYLIB_default OFF)
if(LLVM_LINK_LLVM_DYLIB OR LLVM_BUILD_LLVM_C_DYLIB)
set(LLVM_BUILD_LLVM_DYLIB_default ON)
endif()

set(CAN_BUILD_LLVM_DYLIB NOT MSVC OR LLVM_BUILD_LLVM_DYLIB_VIS)
CMAKE_DEPENDENT_OPTION(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" ${LLVM_BUILD_LLVM_DYLIB_default}
"CAN_BUILD_LLVM_DYLIB" OFF)
CMAKE_DEPENDENT_OPTION(LLVM_LINK_LLVM_DYLIB "Link tools against the libllvm dynamic library" OFF
"CAN_BUILD_LLVM_DYLIB" OFF)

CMAKE_DEPENDENT_OPTION(LLVM_DYLIB_EXPORT_INLINES OFF
"Force inline members of classes to be DLL exported when
building with clang-cl so the libllvm DLL is compatible with MSVC"
"MSVC;LLVM_BUILD_LLVM_DYLIB_VIS" OFF)
CMAKE_DEPENDENT_OPTION(LLVM_DYLIB_EXPORT_INLINES "Force inline members of classes to be DLL exported when
building with clang-cl so the libllvm DLL is compatible with MSVC"
OFF
"MSVC;LLVM_BUILD_LLVM_DYLIB_VIS" OFF)

# Build llvm dynamic library with explicit symbol visibility on windows and default hidden symbol visibility on Linux
if(LLVM_BUILD_LLVM_DYLIB_VIS)
Expand Down

0 comments on commit 1a98960

Please sign in to comment.