aboutsummaryrefslogtreecommitdiffstats
path: root/community/syncthing/only-test-with-race-when-provided.patch
blob: 5b8e4c7f4b55f54620895443b8b6a0026f1e2af8 (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.
diff -Nru a/build.go b/build.go
--- a/build.go  2017-04-15 07:38:23.000000000 +0000
+++ b/build.go  2017-05-12 19:26:36.982569748 +0000
@@ -379,7 +379,7 @@
 func test(pkgs ...string) {
 	lazyRebuildAssets()
 
-	useRace := runtime.GOARCH == "amd64"
+	useRace := race && runtime.GOARCH == "amd64"
 	switch runtime.GOOS {
 	case "darwin", "linux", "freebsd", "windows":
 	default: