[llvm] 9ed9860 - [cmake] Check for empty LLVM_PTHREAD_LIB
Stephen Neuendorffer via llvm-commits
llvm-commits at lists.llvm.org
Wed May 13 16:42:30 PDT 2020
Author: Stephen Neuendorffer
Date: 2020-05-13T16:42:05-07:00
New Revision: 9ed9860d8774b364412ce50bf5d59a8eaee1adb7
URL: https://github.com/llvm/llvm-project/commit/9ed9860d8774b364412ce50bf5d59a8eaee1adb7
DIFF: https://github.com/llvm/llvm-project/commit/9ed9860d8774b364412ce50bf5d59a8eaee1adb7.diff
LOG: [cmake] Check for empty LLVM_PTHREAD_LIB
Windows builds broke because LLVM_THREAD_LIB is not set.
Added:
Modified:
llvm/cmake/modules/AddLLVM.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index cbbe43806425..278f3fa8d49d 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -484,8 +484,10 @@ 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} STREQUAL ${LLVM_PTHREAD_LIB})
- add_dependencies(${obj_name} ${link_lib})
+ if(LLVM_PTHREAD_LIB)
+ if(NOT ${link_lib} STREQUAL ${LLVM_PTHREAD_LIB})
+ add_dependencies(${obj_name} ${link_lib})
+ endif()
endif()
endforeach()
endif()
More information about the llvm-commits
mailing list