one-off patch for CMake issue
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 3 15:42:35 PST 2018
+ Chris and Sylvestre as possible reviewers.
At first glance, it seems like the REMOVE_DUPLICATES operation isn't the only one we'd like to skip if LIB_NAMES is empty.
vedant
> On Jan 3, 2018, at 12:42 PM, Andy Bauer via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
> Hi,
>
> Below is a patch for fixing a CMake issue I found:
> diff --git a/tools/llvm-shlib/CMakeLists.txt b/tools/llvm-shlib/CMakeLists.txt
> index b2109c8..a032540 100644
> --- a/tools/llvm-shlib/CMakeLists.txt
> +++ b/tools/llvm-shlib/CMakeLists.txt
> @@ -36,7 +36,9 @@ endif()
>
> 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 "DragonFly")
>
>
>
> The CMake issue was that if LIB_NAMES is not defined then the list() method cannot remove duplicates. I encountered this when I enabled BUILD_SHARED_LIBS. Attached is my CMakeCache.txt that I encountered the issue with. The git SHA I'm working from is
> 668a58d36b428217126511749a575aeb83fbc12f.
>
> Please let me know if you need more information to properly review this patch.
>
> Best,
> Andy
>
>
> <CMakeCache.txt>_______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list