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.

llvm-svn: 255745
This commit is contained in:
Peter Collingbourne 2015-12-16 02:14:57 +00:00
parent 60103383f0
commit 16c1978760
1 changed files with 6 additions and 0 deletions

View File

@ -17,10 +17,16 @@ if( LLVM_USE_SANITIZE_COVERAGE )
add_library(LLVMFuzzerNoMain STATIC add_library(LLVMFuzzerNoMain STATIC
$<TARGET_OBJECTS:LLVMFuzzerNoMainObjects> $<TARGET_OBJECTS:LLVMFuzzerNoMainObjects>
) )
if( HAVE_LIBPTHREAD )
target_link_libraries(LLVMFuzzerNoMain pthread)
endif()
add_library(LLVMFuzzer STATIC add_library(LLVMFuzzer STATIC
FuzzerMain.cpp FuzzerMain.cpp
$<TARGET_OBJECTS:LLVMFuzzerNoMainObjects> $<TARGET_OBJECTS:LLVMFuzzerNoMainObjects>
) )
if( HAVE_LIBPTHREAD )
target_link_libraries(LLVMFuzzer pthread)
endif()
if( LLVM_INCLUDE_TESTS ) if( LLVM_INCLUDE_TESTS )
add_subdirectory(test) add_subdirectory(test)