cmd/racebuild: add darwin/arm64 support

In Go 1.16 we added darwin/arm64 (macOS) port, along with race
detector support. At that time we didn't have a builder, so the
syso file was built manually. Now that we have a builder, this CL
adds darwin/arm64 support to racebuild, so the syso file can be
built with it.

Verified that it successfully builds the syso and it passes the
tests.

Change-Id: I0bac1345a0b5f1df74dcb47cec13b6856a647094
Reviewed-on: https://go-review.googlesource.com/c/build/+/318110
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
diff --git a/cmd/racebuild/racebuild.go b/cmd/racebuild/racebuild.go
index 9226130..4e439ff 100644
--- a/cmd/racebuild/racebuild.go
+++ b/cmd/racebuild/racebuild.go
@@ -92,6 +92,23 @@
 			`,
 	},
 	&Platform{
+		OS:   "darwin",
+		Arch: "arm64",
+		Type: "darwin-arm64-11_0-toothrot",
+		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_darwin_arm64.syso go/src/runtime/race
+(cd go/src && ./race.bash)
+			`,
+	},
+	&Platform{
 		OS:   "linux",
 		Arch: "amd64",
 		Type: "linux-amd64-race",