Skip to content

Commit 9be0d76

Browse files
AlexeySachkovAlexeySotkin
authored andcommitted
Fix in-tree build.
LLVM_COMPONENTS variable is used inside add_llvm_library and passig it's value as LINK_COMPONENTS argument brokes something.
1 parent 14dc712 commit 9be0d76

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 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_COMPONENTS LLVM)
179+
set (LLVM_LIBS LLVM)
180180
else (LLVM_LINK_LLVM_DYLIB)
181-
set (LLVM_COMPONENTS
181+
set (LLVM_LIBS
182182
Analysis
183183
AsmParser
184184
AsmPrinter
@@ -221,7 +221,7 @@ elseif(NOT LLVM_LINK_LLVM_DYLIB)
221221
# SPIRV-LLVM-Translator is included into LLVM as a component, but
222222
# LLVM components is not linked together into an umbrella library.
223223
# So, we need to list SPIRV-LLVM-Translator there explicitly as a component
224-
set(LLVM_COMPONENTS ${LLVM_LIBS} SPIRVLib)
224+
set(LLVM_LIBS ${LLVM_LIBS} SPIRVLib)
225225
endif(USE_PREBUILT_LLVM AND NOT LLVMSPIRV_INCLUDED_IN_LLVM)
226226

227227
add_subdirectory(cl_headers)
@@ -235,7 +235,7 @@ add_llvm_library(${TARGET_NAME} SHARED
235235

236236
DEPENDS CClangCompileOptions
237237
LINK_COMPONENTS
238-
${LLVM_COMPONENTS}
238+
${LLVM_LIBS}
239239
LINK_LIBS
240240
# The list of clang libraries is taken from clang makefile
241241
# (build/tools/clang/tools/driver/CMakeFiles/clang.dir/link.txt)

0 commit comments

Comments
 (0)