From: Josh Bleecher Snyder Date: Sun, 16 Apr 2017 13:42:25 +0000 (-0700) Subject: cmd/go: disable compiler DWARF generation on some platforms X-Git-Tag: go1.9beta1~668 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6bfd65631ffcf4a3dad32c661a0c155088f83131;p=gostls13.git cmd/go: disable compiler DWARF generation on some platforms 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 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go index 0e1cadd390..dd50fb4b50 100644 --- a/src/cmd/go/internal/work/build.go +++ b/src/cmd/go/internal/work/build.go @@ -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") }