cmd/racebuild: add OpenBSD platform

As part of CL 237057. The race builder needs to know how to build the
.syso files on OpenBSD.

Updates golang/go#39464.

Change-Id: I71974e924801544be20be44c453bd3bc982443d6
GitHub-Last-Rev: 239f7d2800305034fd010592afabdaeb9861c25a
GitHub-Pull-Request: golang/build#31
Reviewed-on: https://go-review.googlesource.com/c/build/+/239499
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Joel Sing <joel@sing.id.au>
Trust: Joel Sing <joel@sing.id.au>
Run-TryBot: Keith Randall <khr@golang.org>
diff --git a/cmd/racebuild/racebuild.go b/cmd/racebuild/racebuild.go
index e60a5a3..9226130 100644
--- a/cmd/racebuild/racebuild.go
+++ b/cmd/racebuild/racebuild.go
@@ -41,6 +41,23 @@
 // TODO: use buildlet package instead of calling out to gomote.
 var platforms = []*Platform{
 	&Platform{
+		OS:   "openbsd",
+		Arch: "amd64",
+		Type: "openbsd-amd64-race",
+		Script: `#!/usr/bin/env bash
+set -e
+git clone https://go.googlesource.com/go
+pushd go
+git checkout $GOREV
+popd
+git clone https://github.com/llvm/llvm-project
+(cd llvm-project && git checkout $REV)
+(cd llvm-project/compiler-rt/lib/tsan/go && CC=clang ./buildgo.sh)
+cp llvm-project/compiler-rt/lib/tsan/go/race_openbsd_amd64.syso go/src/runtime/race
+(cd go/src && ./race.bash)
+			`,
+	},
+	&Platform{
 		OS:   "freebsd",
 		Arch: "amd64",
 		Type: "freebsd-amd64-race",