Skip to content

Commit

Permalink
cmd/link: disable mach-o dwarf munging with -w (in addition to -s)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
rsc committed Mar 30, 2017
1 parent 371c83b commit 23dc363
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/link/internal/ld/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 23dc363

Please sign in to comment.