From 2a46b08a027a20014d5178c070f759692e59a464 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Mon, 14 Mar 2016 10:17:03 -0700 Subject: [PATCH] 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 --- src/cmd/dist/buildtool.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 {