summaryrefslogtreecommitdiff
path: root/src/race.bash
diff options
context:
space:
mode:
authorDave Cheney <dave@cheney.net>2013-09-29 10:34:41 +1000
committerDave Cheney <dave@cheney.net>2013-09-29 10:34:41 +1000
commit84fbb9841945c9339b1dbcd6ee03b12cd8cccdbb (patch)
tree7aefacc43133c6bf2df1e56acf4890d3947a8b14 /src/race.bash
parentf713639d7792233408b0834ed0671d26d8d53f8f (diff)
downloadgo-84fbb9841945c9339b1dbcd6ee03b12cd8cccdbb.tar.gz
race.bash, race.bat: build a race enabled cmd/cgo before trying to use it
Fixes issue 5537. To avoid `go install -v race std` replacing cmd/cgo with a race enabled version and another package trying to build a cgo enabled package, always build cmd/cgo race enabled before doing the rest of the build. R=remyoudompheng, rsc, dvyukov, minux.ma CC=golang-dev https://codereview.appspot.com/14071044
Diffstat (limited to 'src/race.bash')
-rwxr-xr-xsrc/race.bash2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/race.bash b/src/race.bash
index 3cdc5e10c..18201f992 100755
--- a/src/race.bash
+++ b/src/race.bash
@@ -35,6 +35,8 @@ if [ ! -f make.bash ]; then
exit 1
fi
. ./make.bash --no-banner
+# golang.org/issue/5537 - we must build a race enabled cmd/cgo before trying to use it.
+go install -race cmd/cgo
go install -race std
go test -race -short std
go test -race -run=nothingplease -bench=.* -benchtime=.1s -cpu=4 std