[compiler-rt] 7ed3286 - [LibFuzzer] [tests] [Darwin] Use the pthread library from the SDK

Azharuddin Mohammed via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 09:26:10 PDT 2020


Author: Azharuddin Mohammed
Date: 2020-08-21T09:22:13-07:00
New Revision: 7ed3286a512dde62ba8a72da5d148f64702434b5

URL: https://github.com/llvm/llvm-project/commit/7ed3286a512dde62ba8a72da5d148f64702434b5
DIFF: https://github.com/llvm/llvm-project/commit/7ed3286a512dde62ba8a72da5d148f64702434b5.diff

LOG: [LibFuzzer] [tests] [Darwin] Use the pthread library from the SDK

Added: 
    

Modified: 
    compiler-rt/lib/fuzzer/tests/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/fuzzer/tests/CMakeLists.txt b/compiler-rt/lib/fuzzer/tests/CMakeLists.txt
index cfb039c77d05..5b3e90641954 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()
 


        


More information about the llvm-commits mailing list