aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2017-03-29 20:46:20 -0400
committerAustin Clements <austin@google.com>2017-04-05 16:58:31 +0000
commit84192f2734c276baa3f2814d465eadc8eda82ce5 (patch)
tree1e3fa2f6e85b284ee8f08173f7b7e69d36f8aff4
parent752b8b773de301ef8afe838e71d7a5f23f941b1a (diff)
downloadgo-84192f2734c276baa3f2814d465eadc8eda82ce5.tar.gz
go-84192f2734c276baa3f2814d465eadc8eda82ce5.zip
[release-branch.go1.8] cmd/link: disable mach-o dwarf munging with -w (in addition to -s)
Might as well provide a way around the mach-o munging that doesn't require stripping all symbols. After all, -w does mean no DWARF. For #11887, #19734, and anyone else that needs to disable this code path without losing the symbol table. Change-Id: I254b7539f97fb9211fa90f446264b383e7f3980f Reviewed-on: https://go-review.googlesource.com/39602 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r--src/cmd/link/internal/ld/lib.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
index a6ec97a9f9..6e90d78571 100644
--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
@@ -1223,7 +1223,7 @@ func (l *Link) hostlink() {
l.Logf("%s", out)
}
- if !*FlagS && !debug_s && Headtype == obj.Hdarwin {
+ if !*FlagS && !*FlagW && !debug_s && Headtype == obj.Hdarwin {
// Skip combining dwarf on arm.
if !SysArch.InFamily(sys.ARM, sys.ARM64) {
dsym := filepath.Join(*flagTmpdir, "go.dwarf")