From 7ed3286a512dde62ba8a72da5d148f64702434b5 Mon Sep 17 00:00:00 2001 From: Azharuddin Mohammed Date: Fri, 21 Aug 2020 09:22:13 -0700 Subject: [PATCH] [LibFuzzer] [tests] [Darwin] Use the pthread library from the SDK --- compiler-rt/lib/fuzzer/tests/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler-rt/lib/fuzzer/tests/CMakeLists.txt b/compiler-rt/lib/fuzzer/tests/CMakeLists.txt index cfb039c77d0523..5b3e906419546b 100644 --- a/compiler-rt/lib/fuzzer/tests/CMakeLists.txt +++ b/compiler-rt/lib/fuzzer/tests/CMakeLists.txt @@ -23,6 +23,10 @@ list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS --driver-mode=g++) if(WIN32) list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS -Wl,-defaultlib:libcmt,-defaultlib:oldnames) else() + if (APPLE) + list(APPEND LIBFUZZER_UNITTEST_CFLAGS -isysroot ${DARWIN_osx_SYSROOT}) + list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS -isysroot ${DARWIN_osx_SYSROOT}) + endif() list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS -lpthread) endif()