https://bugs.llvm.org/show_bug.cgi?id=39530
Bug ID: 39530
Summary: cmake with BUILD_SHARED_LIBS / LLVM_BUILD_LLVM_DYLIB
gives an error
Product: Build scripts
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: cmake
Assignee: unassignedb...@nondot.org
Reporter: jss...@sor.snu.ac.kr
CC: llvm-bugs@lists.llvm.org
Created attachment 21068
--> https://bugs.llvm.org/attachment.cgi?id=21068&action=edit
cmake error output
cmake -DCMAKE_BUILD_TYPE="Debug" -DLLVM_TARGETS_TO_BUILD="host;ARM"
-DLLVM_PARALLEL_COMPILE_JOBS="6" -DLLVM_PARALLEL_LINK_JOBS="1"
-DLLVM_OPTIMIZED_TABLEGEN="ON" -DLLVM_BINUTILS_INCDIR=/usr/include
-DLLVM_BUILD_LLVM_DYLIB=ON -GNinja ../llvm
complains as follows:
CMake Error at tools/llvm-shlib/CMakeLists.txt:44 (list):
list sub-command REMOVE_DUPLICATES requires list to be present.
Googling the problem, I found that the following solution works.
diff --git a/tools/llvm-shlib/CMakeLists.txt b/tools/llvm-shlib/CMakeLists.txt
index 187066e..23e768c 100644
--- a/tools/llvm-shlib/CMakeLists.txt
+++ b/tools/llvm-shlib/CMakeLists.txt
@@ -41,7 +41,9 @@ if(LLVM_BUILD_LLVM_DYLIB)
add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
- list(REMOVE_DUPLICATES LIB_NAMES)
+ if(LIB_NAMES)
+ list(REMOVE_DUPLICATES LIB_NAMES)
+ endif()
if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU)
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "GNU")
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs