From 5b00f3232ba003e4dd899e3301499749c57992a2 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Wed, 16 Dec 2015 02:14:57 +0000 Subject: [PATCH] Fuzzer: Fix library dependencies. Newer versions of libstdc++ (4.9+), as well as libc++, depend directly on libpthread from the standard library headers, so libfuzzer needs to declare a standard library dependency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255745 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Fuzzer/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Fuzzer/CMakeLists.txt b/lib/Fuzzer/CMakeLists.txt index 8b4d61905d0..d4d85041d21 100644 --- a/lib/Fuzzer/CMakeLists.txt +++ b/lib/Fuzzer/CMakeLists.txt @@ -17,10 +17,16 @@ if( LLVM_USE_SANITIZE_COVERAGE ) add_library(LLVMFuzzerNoMain STATIC $ ) + if( HAVE_LIBPTHREAD ) + target_link_libraries(LLVMFuzzerNoMain pthread) + endif() add_library(LLVMFuzzer STATIC FuzzerMain.cpp $ ) + if( HAVE_LIBPTHREAD ) + target_link_libraries(LLVMFuzzer pthread) + endif() if( LLVM_INCLUDE_TESTS ) add_subdirectory(test) -- 2.34.1