[PATCH] D15184: [tsan] Enable building and testing TSan Go runtime on OS X

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 04:02:21 PST 2015


kubabrecka created this revision.
kubabrecka added reviewers: dvyukov, samsonov, glider, kcc.
kubabrecka added subscribers: llvm-commits, zaks.anna.

The build and test actually work now, so let's just enable them.

http://reviews.llvm.org/D15184

Files:
  lib/tsan/CMakeLists.txt
  test/tsan/CMakeLists.txt

Index: test/tsan/CMakeLists.txt
===================================================================
--- test/tsan/CMakeLists.txt
+++ test/tsan/CMakeLists.txt
@@ -1,5 +1,5 @@
 set(TSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
-if(NOT ${COMPILER_RT_DEFAULT_TARGET_ARCH} MATCHES "mips" AND NOT APPLE)
+if(NOT ${COMPILER_RT_DEFAULT_TARGET_ARCH} MATCHES "mips")
   list(APPEND TSAN_TEST_DEPS GotsanRuntimeCheck)
 endif()
 if(NOT COMPILER_RT_STANDALONE_BUILD)
Index: lib/tsan/CMakeLists.txt
===================================================================
--- lib/tsan/CMakeLists.txt
+++ lib/tsan/CMakeLists.txt
@@ -113,6 +113,16 @@
     ARCHS ${TSAN_SUPPORTED_ARCH}
     SOURCES ${TSAN_SOURCES} ${TSAN_CXX_SOURCES} ${TSAN_ASM_SOURCES}
     CFLAGS ${TSAN_RTL_CFLAGS})
+
+  # Build and check Go runtime.
+  set(BUILDGO_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/go/buildgo.sh)
+  add_custom_target(GotsanRuntimeCheck
+    COMMAND env "CC=${CMAKE_C_COMPILER} ${OSX_SYSROOT_FLAG}"
+            IN_TMPDIR=1 SILENT=1 ${BUILDGO_SCRIPT}
+    DEPENDS tsan ${BUILDGO_SCRIPT}
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/go
+    COMMENT "Checking TSan Go runtime..."
+    VERBATIM)
 else()
   foreach(arch ${TSAN_SUPPORTED_ARCH})
     if(arch STREQUAL "x86_64")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15184.41737.patch
Type: text/x-patch
Size: 1251 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151203/eee989af/attachment.bin>


More information about the llvm-commits mailing list