cmd/go: the example 'GOFLAGS=-ldflags=-s -ldflags=-w' does not work #29053
Labels
FrozenDueToAge
GoCommand
cmd/go
NeedsFix
The path to resolution is known, but the work has not been done.
release-blocker
Milestone
In https://golang.org/cmd/go/, one can read:
I don't use a debugger, so skipping DWARF and symbol tables speeds up linking binaries and saves space on disk. So I've set up
export GOFLAGS="-ldflags=-s -ldflags=-w"
in my.bash_profile
, like the doc page says. And that works fine forgo build
andgo install
, for example.However:
This might be because
go vet
does its own flag parsing. The fact thatgo test
shows the same bug seems to point in that direction.Seems like a bug to fix in 1.12, since the
cmd/go
doc page suggests doing something that completely breaksgo test
andgo vet
. It's also broken on 1.11.2. I'll have a quick look this afternoon./cc @bcmills @alandonovan
The text was updated successfully, but these errors were encountered: