From af88596b424eb2d51ac19d384137fde0bb6995fb Mon Sep 17 00:00:00 2001 From: LLVM Packaging Team Date: Wed, 18 Oct 2017 15:37:25 +0100 Subject: [PATCH] pthread-link 1;4601;0c=================================================================== Gbp-Pq: Name pthread-link.diff --- clang/tools/libclang/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt index 4116ab7db..136554043 100644 --- a/clang/tools/libclang/CMakeLists.txt +++ b/clang/tools/libclang/CMakeLists.txt @@ -56,6 +56,13 @@ endif () find_library(DL_LIBRARY_PATH dl) if (DL_LIBRARY_PATH) list(APPEND LIBS dl) + +endif() +if (PTHREAD_LIB) + # libpthreads overrides some standard library symbols, so main + # executable must be linked with it in order to provide consistent + # API for all shared libaries loaded by this executable. + list(APPEND LIBS ${PTHREAD_LIB}) endif() option(LIBCLANG_BUILD_STATIC -- 2.30.2