Skip to content

Commit d487d2e

Browse files
committed
Fix in-tree build
1 parent a1aed01 commit d487d2e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,12 @@ set(ADDITIONAL_LIBS )
215215

216216
if(USE_PREBUILT_LLVM AND NOT LLVMSPIRV_INCLUDED_IN_LLVM)
217217
# SPIRV-LLVM-Translator is not included into LLVM as a component.
218-
# So, we need to list it there explicitly as a library
219-
set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} LLVMSPIRVLib)
220-
elseif(NOT LLVM_LINK_LLVM_DYLIB)
221-
# SPIRV-LLVM-Translator is included into LLVM as a component, but
222-
# LLVM components is not linked together into an umbrella library.
223-
# So, we need to list SPIRV-LLVM-Translator there explicitly as a component
224-
set(LLVM_COMPONENTS ${LLVM_LIBS} SPIRVLib)
218+
# So, we need to list it here explicitly as an external library
219+
set(ADDITIONAL_LIBS LLVMSPIRVLib)
220+
else()
221+
# SPIRV-LLVM-Translator is built as part of LLVM build.
222+
# We should add it to the list of LLVM components
223+
list(APPEND LLVM_COMPONENTS SPIRVLib)
225224
endif(USE_PREBUILT_LLVM AND NOT LLVMSPIRV_INCLUDED_IN_LLVM)
226225

227226
add_subdirectory(cl_headers)

0 commit comments

Comments
 (0)