tsan: add platform suffix to Go runtime library


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160304 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/tsan/go/buildgo.sh b/lib/tsan/go/buildgo.sh
index 0741790..8551601 100755
--- a/lib/tsan/go/buildgo.sh
+++ b/lib/tsan/go/buildgo.sh
@@ -3,8 +3,10 @@
 
 if [ "`uname -a | grep Linux`" != "" ]; then
 	LINUX=1
+	SUFFIX="linux_amd64"
 elif [ "`uname -a | grep Darwin`" != "" ]; then
 	MAC=1
+	SUFFIX="darwin_amd64"
 else
 	echo Unknown platform
 	exit 1
@@ -67,9 +69,9 @@
 echo gcc gotsan.cc -S -o tmp.s $FLAGS $CFLAGS
 gcc gotsan.cc -S -o tmp.s $FLAGS $CFLAGS
 cat tmp.s $ASMS > gotsan.s
-echo as gotsan.s -o gotsan.syso
-as gotsan.s -o gotsan.syso
+echo as gotsan.s -o gotsan_$SUFFIX.syso
+as gotsan.s -o gotsan_$SUFFIX.syso
 
-gcc test.c gotsan.syso -lpthread -o test
+gcc test.c gotsan_$SUFFIX.syso -lpthread -o test
 ./test