Skip to content

Commit 2918727

Browse files
committed
[libFuzzer] Do not link pthreads on Android.
Android has pthreads included in bionic and doesn't recognize -lpthread.
1 parent b727cfe commit 2918727

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler-rt/lib/fuzzer/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ else()
191191
set(LIBFUZZER_SHARED_LINK_LIBS ${SANITIZER_COMMON_LINK_LIBS})
192192
list(APPEND LIBFUZZER_SHARED_LINK_LIBS "-lstdc++")
193193
list(APPEND LIBFUZZER_SHARED_LINK_LIBS "-lm")
194-
list(APPEND LIBFUZZER_SHARED_LINK_LIBS "-lpthread")
194+
if(NOT ANDROID)
195+
list(APPEND LIBFUZZER_SHARED_LINK_LIBS "-lpthread")
196+
endif()
195197

196198
# If we aren't statically linking libc++ into the fuzzer, we can build the shared object directly
197199
add_compiler_rt_runtime(clang_rt.fuzzer_no_main

0 commit comments

Comments
 (0)