]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: build bootstrap toolchain with -l
authorMatthew Dempsky <mdempsky@google.com>
Mon, 14 Mar 2016 17:17:03 +0000 (10:17 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 14 Mar 2016 21:30:33 +0000 (21:30 +0000)
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 <bradfitz@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/dist/buildtool.go

index 3e88004b10e2238261642f9087fa91a972df642b..a11956c78034cc824b0331b4c7616c07d82055e9 100644 (file)
@@ -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 {