From: Russ Cox Date: Wed, 8 Jan 2020 16:00:44 +0000 (-0500) Subject: test/run: make GO_GCFLAGS mean same thing it does during make.bash X-Git-Tag: go1.15beta1~921 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7dbf12573f793df84802f0a65b03e8e6d4186a5c;p=gostls13.git test/run: make GO_GCFLAGS mean same thing it does during make.bash -gcflags=-flag means apply the flags only to the package named on the command line (the main package, for these tests). -gcflags=all=-flag means apply the flags to everything in the build, including the standard library. cmd/dist uses -gcflags=all=$GO_GCFLAGS, so test/run should do the same, as the comment already explains, to avoid rebuilding the entire standard library without the flags during test/run's builds. We changed the scope of the flags without a pattern a few releases ago and missed this one. Change-Id: I039e60ca619d39e5b502261d4a73e1afc7e3f9fc Reviewed-on: https://go-review.googlesource.com/c/go/+/213827 Reviewed-by: Brad Fitzpatrick --- diff --git a/test/run.go b/test/run.go index 85dc51d1dd..76babdfae8 100644 --- a/test/run.go +++ b/test/run.go @@ -459,7 +459,7 @@ func init() { checkShouldTest() } // or else the commands will rebuild any needed packages (like runtime) // over and over. func goGcflags() string { - return "-gcflags=" + os.Getenv("GO_GCFLAGS") + return "-gcflags=all=" + os.Getenv("GO_GCFLAGS") } // run runs a test.