[PATCH] D79908: [cmake] Update creation of object library dependencies for LINK_LIBS PUBLIC (v2)
Stephen Neuendorffer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 13 14:42:40 PDT 2020
stephenneuendorffer created this revision.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
REGEX matching doesn't work here because the problematic library can
sometimes be "-lpthread" and sometimes "pthread". Let's do the
simplest thing possible and just string compare.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D79908
Files:
llvm/cmake/modules/AddLLVM.cmake
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -484,7 +484,7 @@
${ARG_LINK_LIBS})
foreach(link_lib ${LINK_LIBS_ARG_PUBLIC})
# Can't specify a dependence on -lpthread
- if(NOT ${link_lib} MATCHES "-.*")
+ if(NOT ${link_lib} STREQUAL ${LLVM_PTHREAD_LIB})
add_dependencies(${obj_name} ${link_lib})
endif()
endforeach()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79908.263853.patch
Type: text/x-patch
Size: 520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200513/896c1dc1/attachment.bin>
More information about the llvm-commits
mailing list