From: Peter Collingbourne Date: Wed, 16 Dec 2015 02:14:57 +0000 (+0000) Subject: Fuzzer: Fix library dependencies. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5b00f3232ba003e4dd899e3301499749c57992a2;p=oota-llvm.git 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 --- 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)