[llvm] 71ddc03 - [cmake] Update creation of object library dependencies for LINK_LIBS PUBLIC (v2)
Stephen Neuendorffer via llvm-commits
llvm-commits at lists.llvm.org
Wed May 13 14:18:41 PDT 2020
Author: Stephen Neuendorffer
Date: 2020-05-13T14:18:21-07:00
New Revision: 71ddc03a59bf8af02fb670d6c3221c83ad5be3a3
URL: https://github.com/llvm/llvm-project/commit/71ddc03a59bf8af02fb670d6c3221c83ad5be3a3
DIFF: https://github.com/llvm/llvm-project/commit/71ddc03a59bf8af02fb670d6c3221c83ad5be3a3.diff
LOG: [cmake] Update creation of object library dependencies for LINK_LIBS PUBLIC (v2)
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.
Differential Revision: https://reviews.llvm.org/D79908
Added:
Modified:
llvm/cmake/modules/AddLLVM.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index cf8f29975e42..cbbe43806425 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -484,7 +484,7 @@ function(llvm_add_library name)
${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()
More information about the llvm-commits
mailing list