]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: disable compiler DWARF generation on some platforms
authorJosh Bleecher Snyder <josharian@gmail.com>
Sun, 16 Apr 2017 13:42:25 +0000 (06:42 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 17 Apr 2017 03:18:22 +0000 (03:18 +0000)
The linker disables DWARF for these platforms.
Given that, we can spare the compiler some work.

Change-Id: Ic5a6b675150aca199bdc1dd2cdf5eeb4e215bdff
Reviewed-on: https://go-review.googlesource.com/40859
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/internal/work/build.go

index 0e1cadd390a290795512e11bac7e93cc8db828f5..dd50fb4b504b5b064eb2380e92e0073ff71dff54 100644 (file)
@@ -2203,7 +2203,8 @@ func (gcToolchain) gc(b *Builder, p *load.Package, archive, obj string, asmhdr b
        if p.Internal.BuildID != "" {
                gcargs = append(gcargs, "-buildid", p.Internal.BuildID)
        }
-       if p.Internal.OmitDebug {
+       platform := cfg.Goos + "/" + cfg.Goarch
+       if p.Internal.OmitDebug || platform == "nacl/amd64p32" || platform == "darwin/arm" || platform == "darwin/arm64" {
                gcargs = append(gcargs, "-dwarf=false")
        }