]> Cypherpunks repositories - gostls13.git/commitdiff
race.bash, race.bat: build a race enabled cmd/cgo before trying to use it
authorDave Cheney <dave@cheney.net>
Sun, 29 Sep 2013 00:34:41 +0000 (10:34 +1000)
committerDave Cheney <dave@cheney.net>
Sun, 29 Sep 2013 00:34:41 +0000 (10:34 +1000)
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

src/race.bash
src/race.bat

index 3cdc5e10c1e9fe54c521e58f349ef2935baf76dd..18201f992ce1127a1031260618b31fdc9a630ba9 100755 (executable)
@@ -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
index 989a2e7d811a1ac77942fb3ee874620a75a5c1cb..0a6aee9e2b41eca4a6c2d63f11120c35fb776ec2 100644 (file)
@@ -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