blob: 236c1e0864e4cb20f389ba4fb6f9f25e4e948499 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
Only use -race when -race is also given to build.go on the command line:
x86_64 musl targets do not support the Go race runtime.
--- a/build.go
+++ b/build.go
@@ -364,7 +364,7 @@
args := []string{"test", "-short", "-timeout", timeout, "-tags", "purego"}
- if runtime.GOARCH == "amd64" {
+ if race && runtime.GOARCH == "amd64" {
switch runtime.GOOS {
case "darwin", "linux", "freebsd": // , "windows": # See https://github.com/golang/go/issues/27089
args = append(args, "-race")
|