]> Cypherpunks repositories - gostls13.git/commit
cmd/go: put user ldflags at the end of the linker invocation
authorJosh Bleecher Snyder <josharian@gmail.com>
Wed, 31 Dec 2014 21:25:52 +0000 (13:25 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Fri, 2 Jan 2015 18:36:44 +0000 (18:36 +0000)
commit8bbd80063b986e106ab35727e483be8bdcfd9f5b
treeb3409081c0f692183f29c633477fe45d97ba9e18
parent79c4fad8c2416bd7c7865b337d70bc7f92153415
cmd/go: put user ldflags at the end of the linker invocation

If the user provided a key but no value via -ldflag -X,
another linker flag was used as the value.

Placing the user's flags at the end avoids this problem.
It also provides the user the opportunity to
override existing linker flags.

Fixes #8810.

Change-Id: I96f4190713dc9a9c29142e56658446fba7fb6bc8
Reviewed-on: https://go-review.googlesource.com/2242
Reviewed-by: Minux Ma <minux@golang.org>
src/cmd/go/build.go
test/linkx_run.go