]> Cypherpunks repositories - gostls13.git/commit
cmd/go: deduplicate gccgo afiles by package path, not *Package
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Fri, 8 Apr 2016 03:06:04 +0000 (15:06 +1200)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Thu, 14 Apr 2016 20:19:43 +0000 (20:19 +0000)
commit12e3b184f0fe15787be7f0837d2b168a4fbe60be
treecf46d191a456eb9e3bb508e98b99f490e3e0b472
parente5463f5055d590046a451a115ceac7b58b3f825f
cmd/go: deduplicate gccgo afiles by package path, not *Package

This code was fixed a while ago to ensure that xtest and fake packages came
first on the link line, but golang.org/cl/16775 added --whole-archive ...
--no-whole-archive around all the .a files and rendered this fix useless.

So, take a different approach and only put one .a file on the linker command
line for each ImportPath we see while traversing the action graph, not for each
*Package we see. The way we walk the graph ensures that we'll see the .a files
that need to be first first.

Change-Id: I137f00f129ccc9fc99f40eee885cc04cc358a62e
Reviewed-on: https://go-review.googlesource.com/21692
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/build.go