Commit 87065a3c authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/go: don't generate DWARF in the compiler if the linker will discard it

Change-Id: I7610f968f5c22b51a6a8813d6f31ccb772a12ba9
Reviewed-on: https://go-review.googlesource.com/40858
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent da67c23f
......@@ -2203,6 +2203,9 @@ 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 {
gcargs = append(gcargs, "-dwarf=false")
}
for _, path := range p.Imports {
if i := strings.LastIndex(path, "/vendor/"); i >= 0 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment