aboutsummaryrefslogtreecommitdiff
path: root/src/race.bat
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
commitcdb33231b2d988b71f03f622fc9c3d2edccc20e0 (patch)
tree60a074ba438b2775b2a14d5d5852775dcc4b1c04 /src/race.bat
parent4da408f676087d6e22356e2564a3e23d49440d16 (diff)
downloadgo-cdb33231b2d988b71f03f622fc9c3d2edccc20e0.tar.gz
go-cdb33231b2d988b71f03f622fc9c3d2edccc20e0.zip
race.bash, race.bat: build a race enabled cmd/cgo before trying to use it
Fixes #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://golang.org/cl/14071044
Diffstat (limited to 'src/race.bat')
-rw-r--r--src/race.bat3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/race.bat b/src/race.bat
index 989a2e7d81..0a6aee9e2b 100644
--- a/src/race.bat
+++ b/src/race.bat
@@ -29,6 +29,9 @@ goto fail
:continue
call make.bat --no-banner --no-local
if %GOBUILDFAIL%==1 goto end
+:: golang.org/issue/5537 - we must build a race enabled cmd/cgo before trying to use it.
+echo # go install -race cmd/cgo
+go install -race cmd/cgo
echo # go install -race std
go install -race std
if errorlevel 1 goto fail