Skip to content

Commit 41a1d1f

Browse files
committed
Fix commit 834e4fe
It was occasionaly committed to master in a non-final state
1 parent 79a6903 commit 41a1d1f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ link_directories(
176176
)
177177

178178
if (LLVM_LINK_LLVM_DYLIB)
179-
set (LLVM_LIBS LLVM)
179+
set (LLVM_COMPONENTS LLVM)
180180
else (LLVM_LINK_LLVM_DYLIB)
181-
set (LLVM_LIBS
181+
set (LLVM_COMPONENTS
182182
Analysis
183183
AsmParser
184184
AsmPrinter
@@ -211,15 +211,17 @@ else (LLVM_LINK_LLVM_DYLIB)
211211
X86Utils)
212212
endif (LLVM_LINK_LLVM_DYLIB)
213213

214+
set(ADDITIONAL_LIBS )
215+
214216
if(USE_PREBUILT_LLVM AND NOT LLVMSPIRV_INCLUDED_IN_LLVM)
215217
# SPIRV-LLVM-Translator is not included into LLVM as a component.
216218
# So, we need to list it there explicitly as a library
217-
set(LLVM_LIBS ${LLVM_LIBS} LLVMSPIRVLib)
219+
set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} LLVMSPIRVLib)
218220
elseif(NOT LLVM_LINK_LLVM_DYLIB)
219221
# SPIRV-LLVM-Translator is included into LLVM as a component, but
220222
# LLVM components is not linked together into an umbrella library.
221223
# So, we need to list SPIRV-LLVM-Translator there explicitly as a component
222-
set(LLVM_LIBS ${LLVM_LIBS} SPIRVLib)
224+
set(LLVM_COMPONENTS ${LLVM_LIBS} SPIRVLib)
223225
endif(USE_PREBUILT_LLVM AND NOT LLVMSPIRV_INCLUDED_IN_LLVM)
224226

225227
add_subdirectory(cl_headers)
@@ -233,7 +235,7 @@ add_llvm_library(${TARGET_NAME} SHARED
233235

234236
DEPENDS CClangCompileOptions
235237
LINK_COMPONENTS
236-
${LLVM_LIBS}
238+
${LLVM_COMPONENTS}
237239
LINK_LIBS
238240
# The list of clang libraries is taken from clang makefile
239241
# (build/tools/clang/tools/driver/CMakeFiles/clang.dir/link.txt)
@@ -266,6 +268,7 @@ add_llvm_library(${TARGET_NAME} SHARED
266268
clangAST
267269
clangLex
268270
clangBasic
271+
${ADDITIONAL_LIBS}
269272
${CMAKE_DL_LIBS})
270273

271274
# Configure resource file on Windows

0 commit comments

Comments
 (0)