[compiler-rt] f202662 - tsan: add ability to compile for different Go subarch values.

Than McIntosh via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 24 04:11:26 PDT 2022


Author: Keith Randall
Date: 2022-08-24T07:11:13-04:00
New Revision: f202662ec3c7b35e3b0b8ea0528a07cf9eefbda8

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

LOG: tsan: add ability to compile for different Go subarch values.

Reviewed By: dvyukov

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

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 574419f24ffd0..ba9aff2c18e56 100755
--- a/compiler-rt/lib/tsan/go/buildgo.sh
+++ b/compiler-rt/lib/tsan/go/buildgo.sh
@@ -59,9 +59,11 @@ if [ "`uname -a | grep Linux`" != "" ]; then
 		ARCHCFLAGS="-m64 -mcpu=power8 -fno-function-sections"
 	elif [ "`uname -a | grep x86_64`" != "" ]; then
 		SUFFIX="linux_amd64"
-		# -msse3 used below to ensure continued support of older
-		# cpus for now, see https://github.com/golang/go/issues/53743.
-		ARCHCFLAGS="-m64 -msse3"
+		if [ $GOAMD64 == "v3" ]; then
+			ARCHCFLAGS="-m64 -msse4.2"
+		else
+			ARCHCFLAGS="-m64 -msse3"
+		fi
 		OSCFLAGS="$OSCFLAGS -ffreestanding -Wno-unused-const-variable -Wno-unknown-warning-option"
 	elif [ "`uname -a | grep aarch64`" != "" ]; then
 		SUFFIX="linux_arm64"


        


More information about the llvm-commits mailing list