1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[cmake] Need PUBLIC dependencies for object targets even if LLVM_PTHREAD_LIB is unset

Fix logic in previous patch.
This commit is contained in:
Stephen Neuendorffer 2020-05-13 17:17:54 -07:00
parent 1f37696718
commit d62135adca

View File

@ -483,11 +483,13 @@ function(llvm_add_library name)
"PUBLIC;PRIVATE"
${ARG_LINK_LIBS})
foreach(link_lib ${LINK_LIBS_ARG_PUBLIC})
# Can't specify a dependence on -lpthread
if(LLVM_PTHREAD_LIB)
# Can't specify a dependence on -lpthread
if(NOT ${link_lib} STREQUAL ${LLVM_PTHREAD_LIB})
add_dependencies(${obj_name} ${link_lib})
endif()
else()
add_dependencies(${obj_name} ${link_libs})
endif()
endforeach()
endif()