]> Cypherpunks repositories - gostls13.git/commit
cmd/go: skip writing dwarf debug info for ephemeral binaries
authorRuss Cox <rsc@golang.org>
Wed, 19 Feb 2014 15:01:15 +0000 (10:01 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 19 Feb 2014 15:01:15 +0000 (10:01 -0500)
commitae38b03f6cab6a25f9d8d34a39e33db9857dce2e
tree6aa52d3122f5d097284cebd3bcec7b90956a0e5c
parent2541cc81978dc5e41e2e2db6345d8ca7a365ca8c
cmd/go: skip writing dwarf debug info for ephemeral binaries

Update #6853

For an ephemeral binary - one created, run, and then deleted -
there is no need to write dwarf debug information, since the
binary will not be used with gdb. In this case, instruct the linker
not to spend time and disk space generating the debug information
by passing the -w flag to the linker.

Omitting dwarf information reduces the size of most binaries by 25%.
We may be more aggressive about this in the future.

LGTM=bradfitz, r
R=r, bradfitz
CC=golang-codereviews
https://golang.org/cl/65890043
src/cmd/go/build.go
src/cmd/go/pkg.go
src/cmd/go/run.go
src/cmd/go/test.go
test/run.go