• Heschi Kreinick's avatar
    cmd/link: support DWARF compression on Darwin · 726a2d04
    Heschi Kreinick authored
    We want to compress DWARF even on macOS, but the native toolchain isn't
    going to understand it. Add a flag that can be used to disable
    compression, then add Darwin to the whitelist used during internal
    linking.
    
    Unlike GNU ld, the Darwin linker doesn't have a handy linker flag to do
    compression. But since we're already doing surgery to put the DWARF in
    the output executable in the first place, compressing it at the same
    time isn't unduly difficult. This does have the slightly odd effect of
    compressing some Apple proprietary debug sections, which absolutely
    nothing will understand. Leaving them uncompressed didn't make much
    sense, though, since I doubt they're useful without (say) __debug_info.
    
    Updates #11799
    
    Change-Id: Ie00b0215c630a798c59d009a641e2d13f0e7ea01
    Reviewed-on: https://go-review.googlesource.com/120155
    Run-TryBot: Heschi Kreinick <heschi@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarAustin Clements <austin@google.com>
    726a2d04
Name
Last commit
Last update
..
internal Loading commit data...
doc.go Loading commit data...
dwarf_test.go Loading commit data...
link_test.go Loading commit data...
linkbig_test.go Loading commit data...
main.go Loading commit data...