[libcxx] r281475 - [libcxx] Enable building and testing of libcxx with ThreadSanitizer on OS X

Kuba Brecka via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 14 07:12:50 PDT 2016


Author: kuba.brecka
Date: Wed Sep 14 09:12:50 2016
New Revision: 281475

URL: http://llvm.org/viewvc/llvm-project?rev=281475&view=rev
Log:
[libcxx] Enable building and testing of libcxx with ThreadSanitizer on OS X

This patch enables building and testing libcxx under ThreadSanitizer on OS X. CMake builds that have -DLLVM_USE_SANITIZER=Thread will automatically build libcxx with -fsanitize=thread and testing via lit then runs under TSan.

Differential Revision: https://reviews.llvm.org/D24297


Modified:
    libcxx/trunk/lib/CMakeLists.txt

Modified: libcxx/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=281475&r1=281474&r2=281475&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Wed Sep 14 09:12:50 2016
@@ -42,6 +42,8 @@ if (APPLE AND LLVM_USE_SANITIZER)
     set(LIBFILE "libclang_rt.asan_osx_dynamic.dylib")
   elseif("${LLVM_USE_SANITIZER}" STREQUAL "Undefined")
     set(LIBFILE "libclang_rt.ubsan_osx_dynamic.dylib")
+  elseif("${LLVM_USE_SANITIZER}" STREQUAL "Thread")
+    set(LIBFILE "libclang_rt.tsan_osx_dynamic.dylib")
   else()
     message(WARNING "LLVM_USE_SANITIZER=${LLVM_USE_SANITIZER} is not supported on OS X")
   endif()




More information about the cfe-commits mailing list