diff --git a/compiler-rt/lib/tsan/CMakeLists.txt b/compiler-rt/lib/tsan/CMakeLists.txt --- a/compiler-rt/lib/tsan/CMakeLists.txt +++ b/compiler-rt/lib/tsan/CMakeLists.txt @@ -18,7 +18,7 @@ endif() set(TSAN_RTL_CFLAGS ${TSAN_CFLAGS}) -append_list_if(COMPILER_RT_HAS_MSSE3_FLAG -msse3 TSAN_RTL_CFLAGS) +append_list_if(COMPILER_RT_HAS_MSSE4_2_FLAG -msse4.2 TSAN_RTL_CFLAGS) append_list_if(SANITIZER_LIMIT_FRAME_SIZE -Wframe-larger-than=530 TSAN_RTL_CFLAGS) append_list_if(COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG -Wglobal-constructors diff --git a/compiler-rt/lib/tsan/go/build.bat b/compiler-rt/lib/tsan/go/build.bat --- a/compiler-rt/lib/tsan/go/build.bat +++ b/compiler-rt/lib/tsan/go/build.bat @@ -58,4 +58,5 @@ -DSANITIZER_DEBUG=0 ^ -O3 ^ -fomit-frame-pointer ^ + -msse4.2 ^ -std=c++14 diff --git a/compiler-rt/lib/tsan/go/buildgo.sh b/compiler-rt/lib/tsan/go/buildgo.sh --- a/compiler-rt/lib/tsan/go/buildgo.sh +++ b/compiler-rt/lib/tsan/go/buildgo.sh @@ -58,7 +58,7 @@ ARCHCFLAGS="-m64 -mcpu=power8 -fno-function-sections" elif [ "`uname -a | grep x86_64`" != "" ]; then SUFFIX="linux_amd64" - ARCHCFLAGS="-m64 -msse3" + ARCHCFLAGS="-m64 -msse4.2" OSCFLAGS="$OSCFLAGS -ffreestanding -Wno-unused-const-variable -Werror -Wno-unknown-warning-option" elif [ "`uname -a | grep aarch64`" != "" ]; then SUFFIX="linux_arm64"