Skip to content

Commit

Permalink
tsan: update Go x86 build rules to back off to sse3
Browse files Browse the repository at this point in the history
This is a partial revert of https://reviews.llvm.org/D106948, changing
just the Go build rules to remove -msse4.2 and revert back to -msse3,
so as to preserve support for older x86 machines. More details at
golang/go#53743.

Reviewed By: dvyukov

Differential Revision: https://reviews.llvm.org/D129482
  • Loading branch information
thanm authored and arichardson committed Sep 12, 2023
1 parent 7f4b75c commit 1cf44c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/tsan/go/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 3 additions & 1 deletion lib/tsan/go/buildgo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1cf44c5

Please sign in to comment.