Skip to content

Commit 9ed9860

Browse files
[cmake] Check for empty LLVM_PTHREAD_LIB
Windows builds broke because LLVM_THREAD_LIB is not set.
1 parent 425333c commit 9ed9860

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,10 @@ function(llvm_add_library name)
484484
${ARG_LINK_LIBS})
485485
foreach(link_lib ${LINK_LIBS_ARG_PUBLIC})
486486
# Can't specify a dependence on -lpthread
487-
if(NOT ${link_lib} STREQUAL ${LLVM_PTHREAD_LIB})
488-
add_dependencies(${obj_name} ${link_lib})
487+
if(LLVM_PTHREAD_LIB)
488+
if(NOT ${link_lib} STREQUAL ${LLVM_PTHREAD_LIB})
489+
add_dependencies(${obj_name} ${link_lib})
490+
endif()
489491
endif()
490492
endforeach()
491493
endif()

0 commit comments

Comments
 (0)