diff options
author | Joel Sing <joel@sing.id.au> | 2020-12-08 04:14:34 +1100 |
---|---|---|
committer | Joel Sing <joel@sing.id.au> | 2021-02-23 12:14:32 +0000 |
commit | b3b65f21762fad1ec37bdb0cd47f79a53814bb16 (patch) | |
tree | a6645ae84a2d94501f72d1896fa8fc9a1f1c4c35 /src/race.bash | |
parent | a78b0e67211034743a1f03645312aed35e5c5ba2 (diff) | |
download | go-b3b65f21762fad1ec37bdb0cd47f79a53814bb16.tar.gz go-b3b65f21762fad1ec37bdb0cd47f79a53814bb16.zip |
runtime: enable race detector on openbsd/amd64
Now that this commit[1] has landed in LLVM the .syso file can be generated for
OpenBSD.
With the changes to src/runtime running the sample race[2] detects the data
race as expected.
Based on golang/go#39464 (https://go-review.googlesource.com/c/go/+/237057) from
Aaron Bieber <deftly@gmail.com>, however the race_openbsd_amd64.syso file has
been built on OpenBSD 6.4 and necessary changes added to race.bash.
[1] https://github.com/llvm/llvm-project/commit/fcf6ae2f070eba73074b6ec8d8281e54d29dbeeb
[2] https://golang.org/doc/articles/race_detector.html
Change-Id: Ic2479ccfa91d6b2cb4585346a11d813d96450f68
Reviewed-on: https://go-review.googlesource.com/c/go/+/275892
Trust: Joel Sing <joel@sing.id.au>
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/race.bash')
-rwxr-xr-x | src/race.bash | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/race.bash b/src/race.bash index e2b96bcffe..81fb4be606 100755 --- a/src/race.bash +++ b/src/race.bash @@ -9,7 +9,7 @@ set -e function usage { - echo 'race detector is only supported on linux/amd64, linux/ppc64le, linux/arm64, freebsd/amd64, netbsd/amd64, darwin/amd64, and darwin/arm64' 1>&2 + echo 'race detector is only supported on linux/amd64, linux/ppc64le, linux/arm64, freebsd/amd64, netbsd/amd64, openbsd/amd64, darwin/amd64, and darwin/arm64' 1>&2 exit 1 } @@ -34,6 +34,11 @@ case $(uname) in usage fi ;; +"OpenBSD") + if [ $(uname -m) != "amd64" ]; then + usage + fi + ;; *) usage ;; |