[compiler-rt] d9b6e32 - tsan: add pragma line to buildgo.sh

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 19 22:22:10 PDT 2021


Author: Dmitry Vyukov
Date: 2021-07-20T07:22:01+02:00
New Revision: d9b6e32dd74c63a12fb2872ca1b36479e4946a81

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

LOG: tsan: add pragma line to buildgo.sh

Add pragma line so that errors messages point to the actual
source files rather than to the concatenated gotsan.cpp.

Reviewed By: vitalybuka, melver

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/tsan/go/buildgo.sh b/compiler-rt/lib/tsan/go/buildgo.sh
index a16735de2ea0e..3e4e2269ebc20 100755
--- a/compiler-rt/lib/tsan/go/buildgo.sh
+++ b/compiler-rt/lib/tsan/go/buildgo.sh
@@ -170,11 +170,10 @@ else
 fi
 
 SRCS="$SRCS $ADD_SRCS"
-
-rm -f $DIR/gotsan.cpp
 for F in $SRCS; do
-	cat $F >> $DIR/gotsan.cpp
-done
+	echo "#line 1 \"$F\""
+	cat $F
+done > $DIR/gotsan.cpp
 
 FLAGS=" -I../rtl -I../.. -I../../sanitizer_common -I../../../include -std=c++14 -Wall -fno-exceptions -fno-rtti -DSANITIZER_GO=1 -DSANITIZER_DEADLOCK_DETECTOR_VERSION=2 $OSCFLAGS $ARCHCFLAGS $EXTRA_CFLAGS"
 DEBUG_FLAGS="$FLAGS -DSANITIZER_DEBUG=1 -g"


        


More information about the llvm-commits mailing list