1
0
mirror of https://github.com/golang/go synced 2024-11-22 14:44:50 -07:00
go/src/race.bash
Ilya Leoshkevich 87cf92e7d5 cmd,runtime: enable race detector on s390x
LLVM has SystemZ ThreadSanitizer support now [1], this patch integrates
it with golang. The biggest part is the glue code in race_s390x.s,
which is derived from race_arm64.s, and then the support needs to be
enabled in four places.

[1] https://reviews.llvm.org/D105629

Change-Id: I1d4e51beb4042603b681e4aca9af6072879d54d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/336549
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
2022-05-04 14:17:20 +00:00

36 lines
919 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright 2013 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# race.bash tests the standard library under the race detector.
# https://golang.org/doc/articles/race_detector.html
set -e
function usage {
echo 'race detector is only supported on linux/amd64, linux/ppc64le, linux/arm64, linux/s390x, freebsd/amd64, netbsd/amd64, openbsd/amd64, darwin/amd64, and darwin/arm64' 1>&2
exit 1
}
case $(uname -s -m) in
"Darwin x86_64") ;;
"Darwin arm64") ;;
"Linux x86_64") ;;
"Linux ppc64le") ;;
"Linux aarch64") ;;
"Linux s390x") ;;
"FreeBSD amd64") ;;
"NetBSD amd64") ;;
"OpenBSD amd64") ;;
*) usage ;;
esac
if [ ! -f make.bash ]; then
echo 'race.bash must be run from $GOROOT/src' 1>&2
exit 1
fi
. ./make.bash --no-banner
go install -race std
go tool dist test -race