From: Dmitry Vyukov Date: Mon, 19 Jul 2021 13:51:08 +0000 (+0200) Subject: tsan: remove duplicate arch switch in buildgo.sh X-Git-Tag: llvmorg-14-init~1046 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f67263d56a0f5c1ebc9f576502f667d7d34c685;p=platform%2Fupstream%2Fllvm.git tsan: remove duplicate arch switch in buildgo.sh For some reason we have 2 switches on arch and add half of arch flags in one place and half in another. Merge these 2 switches. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D106274 --- diff --git a/compiler-rt/lib/tsan/go/buildgo.sh b/compiler-rt/lib/tsan/go/buildgo.sh index b57bb4e69525..a16735de2ea0 100755 --- a/compiler-rt/lib/tsan/go/buildgo.sh +++ b/compiler-rt/lib/tsan/go/buildgo.sh @@ -57,10 +57,10 @@ if [ "`uname -a | grep Linux`" != "" ]; then " if [ "`uname -a | grep ppc64le`" != "" ]; then SUFFIX="linux_ppc64le" - ARCHCFLAGS="-m64" + ARCHCFLAGS="-m64 -mcpu=power8 -fno-function-sections" elif [ "`uname -a | grep x86_64`" != "" ]; then SUFFIX="linux_amd64" - ARCHCFLAGS="-m64" + ARCHCFLAGS="-m64 -msse3" OSCFLAGS="$OSCFLAGS -ffreestanding -Wno-unused-const-variable -Werror -Wno-unknown-warning-option" elif [ "`uname -a | grep aarch64`" != "" ]; then SUFFIX="linux_arm64" @@ -179,11 +179,6 @@ done FLAGS=" -I../rtl -I../.. -I../../sanitizer_common -I../../../include -std=c++14 -Wall -fno-exceptions -fno-rtti -DSANITIZER_GO=1 -DSANITIZER_DEADLOCK_DETECTOR_VERSION=2 $OSCFLAGS $ARCHCFLAGS $EXTRA_CFLAGS" DEBUG_FLAGS="$FLAGS -DSANITIZER_DEBUG=1 -g" FLAGS="$FLAGS -DSANITIZER_DEBUG=0 -O3 -fomit-frame-pointer" -if [ "$SUFFIX" = "linux_ppc64le" ]; then - FLAGS="$FLAGS -mcpu=power8 -fno-function-sections" -elif [ "$SUFFIX" = "linux_amd64" ]; then - FLAGS="$FLAGS -msse3" -fi if [ "$DEBUG" = "" ]; then # Do a build test with debug flags.