diff --git a/compiler-rt/lib/tsan/go/build.bat b/compiler-rt/lib/tsan/go/build.bat index 04cc8b242809d5..d7d2e325c0c173 100644 --- a/compiler-rt/lib/tsan/go/build.bat +++ b/compiler-rt/lib/tsan/go/build.bat @@ -59,5 +59,8 @@ gcc ^ -DSANITIZER_DEBUG=0 ^ -O3 ^ -fomit-frame-pointer ^ - -msse4.2 ^ + -msse3 ^ -std=c++14 + +rem "-msse3" used above to ensure continued support of older +rem cpus (for now), see https://github.com/golang/go/issues/53743. diff --git a/compiler-rt/lib/tsan/go/buildgo.sh b/compiler-rt/lib/tsan/go/buildgo.sh index 6965e53b858fbb..2e4ffb646afbc5 100755 --- a/compiler-rt/lib/tsan/go/buildgo.sh +++ b/compiler-rt/lib/tsan/go/buildgo.sh @@ -59,7 +59,9 @@ if [ "`uname -a | grep Linux`" != "" ]; then ARCHCFLAGS="-m64 -mcpu=power8 -fno-function-sections" elif [ "`uname -a | grep x86_64`" != "" ]; then SUFFIX="linux_amd64" - ARCHCFLAGS="-m64 -msse4.2" + # -msse3 used below to ensure continued support of older + # cpus for now, see https://github.com/golang/go/issues/53743. + ARCHCFLAGS="-m64 -msse3" OSCFLAGS="$OSCFLAGS -ffreestanding -Wno-unused-const-variable -Wno-unknown-warning-option" elif [ "`uname -a | grep aarch64`" != "" ]; then SUFFIX="linux_arm64"