From: Matthew Dempsky Date: Mon, 14 Mar 2016 17:17:03 +0000 (-0700) Subject: cmd/dist: build bootstrap toolchain with -l X-Git-Tag: go1.7beta1~1335 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2a46b08a027a20014d5178c070f759692e59a464;p=gostls13.git cmd/dist: build bootstrap toolchain with -l Workaround Go 1.4 compiler bugs. See discussion at: https://groups.google.com/d/msg/golang-dev/Ss7mCKsvk8w/Gsq7VYI0AwAJ Change-Id: I842335fddffb67a6e21c000fe5bef258ea61c77a Reviewed-on: https://go-review.googlesource.com/20690 Reviewed-by: Brad Fitzpatrick Reviewed-by: Robert Griesemer Run-TryBot: Matthew Dempsky TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go index 3e88004b10..a11956c780 100644 --- a/src/cmd/dist/buildtool.go +++ b/src/cmd/dist/buildtool.go @@ -111,8 +111,10 @@ func bootstrapBuildTools() { os.Setenv("GOARCH", "") os.Setenv("GOHOSTARCH", "") - // Run Go 1.4 to build binaries. - run(workspace, ShowOutput|CheckExit, pathf("%s/bin/go", goroot_bootstrap), "install", "-v", "bootstrap/...") + // Run Go 1.4 to build binaries. Use -gcflags=-l to disable inlining to + // workaround bugs in Go 1.4's compiler. See discussion thread: + // https://groups.google.com/d/msg/golang-dev/Ss7mCKsvk8w/Gsq7VYI0AwAJ + run(workspace, ShowOutput|CheckExit, pathf("%s/bin/go", goroot_bootstrap), "install", "-gcflags=-l", "-v", "bootstrap/...") // Copy binaries into tool binary directory. for _, name := range bootstrapDirs {