Skip to content

Commit

Permalink
Add support for toolchain compilation with LLVM_LINK_LLVM_DYLIB option (
Browse files Browse the repository at this point in the history
  • Loading branch information
fineg74 authored and dbudanov-cmplr committed Sep 9, 2022
1 parent 40b32c3 commit 4447e58
Showing 1 changed file with 34 additions and 13 deletions.
47 changes: 34 additions & 13 deletions llvm-spirv/lib/SPIRV/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_llvm_library(LLVMSPIRVLib
set(SRC_LIST
LLVMSPIRVOpts.cpp
LLVMToSPIRVDbgTran.cpp
Mangler/FunctionDescriptor.cpp
Expand Down Expand Up @@ -36,20 +36,41 @@ add_llvm_library(LLVMSPIRVLib
libSPIRV/SPIRVStream.cpp
libSPIRV/SPIRVType.cpp
libSPIRV/SPIRVValue.cpp
LINK_COMPONENTS
Analysis
BitWriter
CodeGen
Core
Demangle
IRReader
Linker
Passes
Support
TransformUtils
)
if(LLVM_LINK_LLVM_DYLIB)
add_llvm_library(LLVMSPIRVLib STATIC DISABLE_LLVM_LINK_LLVM_DYLIB
${SRC_LIST}
DEPENDS
intrinsics_gen
LLVMAnalysis
LLVMBitWriter
LLVMCodeGen
LLVMCore
LLVMDemangle
LLVMIRReader
LLVMLinker
LLVMPasses
LLVMSupport
LLVMTransformUtils
)
else()
add_llvm_library(LLVMSPIRVLib
${SRC_LIST}
LINK_COMPONENTS
Analysis
BitWriter
CodeGen
Core
Demangle
IRReader
Linker
Passes
Support
TransformUtils
DEPENDS
intrinsics_gen
)
)
endif()

target_include_directories(LLVMSPIRVLib
PRIVATE
Expand Down

0 comments on commit 4447e58

Please sign in to comment.