[libFuzzer] Do not link pthreads on Android.

Android has pthreads included in bionic and doesn't recognize -lpthread.
This commit is contained in:
Matt Morehouse 2020-08-05 11:11:42 -07:00
parent b727cfed5e
commit 2918727588
1 changed files with 3 additions and 1 deletions

View File

@ -191,7 +191,9 @@ else()
set(LIBFUZZER_SHARED_LINK_LIBS ${SANITIZER_COMMON_LINK_LIBS})
list(APPEND LIBFUZZER_SHARED_LINK_LIBS "-lstdc++")
list(APPEND LIBFUZZER_SHARED_LINK_LIBS "-lm")
list(APPEND LIBFUZZER_SHARED_LINK_LIBS "-lpthread")
if(NOT ANDROID)
list(APPEND LIBFUZZER_SHARED_LINK_LIBS "-lpthread")
endif()
# If we aren't statically linking libc++ into the fuzzer, we can build the shared object directly
add_compiler_rt_runtime(clang_rt.fuzzer_no_main