Skip to content

Commit 23dc363

Browse files
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 371c83b commit 23dc363

File tree

1 file changed

+1
-1
lines changed
  • src/cmd/link/internal/ld

1 file changed

+1
-1
lines changed

src/cmd/link/internal/ld/lib.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ func (l *Link) hostlink() {
12281228
l.Logf("%s", out)
12291229
}
12301230

1231-
if !*FlagS && !debug_s && Headtype == obj.Hdarwin {
1231+
if !*FlagS && !*FlagW && !debug_s && Headtype == obj.Hdarwin {
12321232
// Skip combining dwarf on arm.
12331233
if !SysArch.InFamily(sys.ARM, sys.ARM64) {
12341234
dsym := filepath.Join(*flagTmpdir, "go.dwarf")

0 commit comments

Comments
 (0)