[compiler-rt] r227870 - [TSan] Fix Go sanity check script.

Alexey Samsonov vonosmas at gmail.com
Mon Feb 2 14:07:40 PST 2015


Author: samsonov
Date: Mon Feb  2 16:07:39 2015
New Revision: 227870

URL: http://llvm.org/viewvc/llvm-project?rev=227870&view=rev
Log:
[TSan] Fix Go sanity check script.

Modified:
    compiler-rt/trunk/lib/tsan/CMakeLists.txt
    compiler-rt/trunk/lib/tsan/go/buildgo.sh

Modified: compiler-rt/trunk/lib/tsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/CMakeLists.txt?rev=227870&r1=227869&r2=227870&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/tsan/CMakeLists.txt Mon Feb  2 16:07:39 2015
@@ -101,10 +101,10 @@ endif()
 add_dependencies(compiler-rt tsan)
 
 # Sanity check for Go runtime.
+set(BUILDGO_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/go/buildgo.sh)
 add_custom_target(GotsanRuntimeCheck
-  COMMAND CC=${CMAKE_C_COMPILER} IN_TMPDIR=1 SILENT=1
-          ${CMAKE_CURRENT_SOURCE_DIR}/go/buildgo.sh
-  DEPENDS clang_rt.tsan-${arch}
+  COMMAND CC=${CMAKE_C_COMPILER} IN_TMPDIR=1 SILENT=1 ${BUILDGO_SCRIPT}
+  DEPENDS clang_rt.tsan-${arch} ${BUILDGO_SCRIPT}
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/go
   COMMENT "Checking TSan Go runtime..."
   VERBATIM)

Modified: compiler-rt/trunk/lib/tsan/go/buildgo.sh
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/go/buildgo.sh?rev=227870&r1=227869&r2=227870&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/go/buildgo.sh (original)
+++ compiler-rt/trunk/lib/tsan/go/buildgo.sh Mon Feb  2 16:07:39 2015
@@ -35,7 +35,8 @@ if [ "`uname -a | grep Linux`" != "" ];
 	SUFFIX="linux_amd64"
 	OSCFLAGS="-fPIC -ffreestanding -Wno-maybe-uninitialized -Wno-unused-const-variable -Werror -Wno-unknown-warning-option"
 	OSLDFLAGS="-lpthread -fPIC -fpie"
-	SRCS+="
+	SRCS="
+		$SRCS
 		../rtl/tsan_platform_linux.cc
 		../../sanitizer_common/sanitizer_posix.cc
 		../../sanitizer_common/sanitizer_posix_libcdep.cc
@@ -49,7 +50,8 @@ elif [ "`uname -a | grep FreeBSD`" != ""
         SUFFIX="freebsd_amd64"
         OSCFLAGS="-fno-strict-aliasing -fPIC -Werror"
         OSLDFLAGS="-lpthread -fPIC -fpie"
-        SRCS+="
+        SRCS="
+                $SRCS
                 ../rtl/tsan_platform_linux.cc
                 ../../sanitizer_common/sanitizer_posix.cc
                 ../../sanitizer_common/sanitizer_posix_libcdep.cc
@@ -63,7 +65,8 @@ elif [ "`uname -a | grep Darwin`" != ""
 	SUFFIX="darwin_amd64"
 	OSCFLAGS="-fPIC -Wno-unused-const-variable -Wno-unknown-warning-option"
 	OSLDFLAGS="-lpthread -fPIC -fpie"
-	SRCS+="
+	SRCS="
+		$SRCS
 		../rtl/tsan_platform_mac.cc
 		../../sanitizer_common/sanitizer_mac.cc
 		../../sanitizer_common/sanitizer_posix.cc
@@ -74,7 +77,8 @@ elif [ "`uname -a | grep MINGW`" != "" ]
 	SUFFIX="windows_amd64"
 	OSCFLAGS="-Wno-error=attributes -Wno-attributes -Wno-unused-const-variable -Wno-unknown-warning-option"
 	OSLDFLAGS=""
-	SRCS+="
+	SRCS="
+		$SRCS
 		../rtl/tsan_platform_windows.cc
 		../../sanitizer_common/sanitizer_win.cc
 	"
@@ -97,7 +101,7 @@ else
   DIR=.
 fi
 
-SRCS+=$ADD_SRCS
+SRCS="$SRCS $ADD_SRCS"
 
 rm -f $DIR/gotsan.cc
 for F in $SRCS; do
@@ -106,9 +110,9 @@ done
 
 FLAGS=" -I../rtl -I../.. -I../../sanitizer_common -I../../../include -std=c++11 -m64 -Wall -fno-exceptions -fno-rtti -DSANITIZER_GO -DSANITIZER_DEADLOCK_DETECTOR_VERSION=2 $OSCFLAGS"
 if [ "$DEBUG" == "" ]; then
-	FLAGS+=" -DSANITIZER_DEBUG=0 -O3 -msse3 -fomit-frame-pointer"
+	FLAGS="$FLAGS -DSANITIZER_DEBUG=0 -O3 -msse3 -fomit-frame-pointer"
 else
-	FLAGS+=" -DSANITIZER_DEBUG=1 -g"
+	FLAGS="$FLAGS -DSANITIZER_DEBUG=1 -g"
 fi
 
 if [ "$SILENT" != "1" ]; then





More information about the llvm-commits mailing list