From 23dc3633ca38b8167a50250eeec948e4cd619056 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 29 Mar 2017 20:46:20 -0400 Subject: [PATCH] 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/38853 Run-TryBot: Russ Cox TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- src/cmd/link/internal/ld/lib.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go index 548b797f14bbd5..070f3f5601af27 100644 --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go @@ -1228,7 +1228,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")