]> Cypherpunks repositories - gostls13.git/commit
cmd/go: handle linking against a shared library that implicitly includes a package
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Tue, 27 Oct 2015 00:36:11 +0000 (13:36 +1300)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Thu, 12 Nov 2015 00:08:07 +0000 (00:08 +0000)
commit4255b78c7da08170321a166d540dfc2c4cfd2ac5
treefa9d17ac98aca73780b9fd31971139f9e12f9b9a
parent9514285da9e97522e76ba053c1b7a929c5d1b7b6
cmd/go: handle linking against a shared library that implicitly includes a package

If you say "go install -buildmode=shared a b" and package a depends on another
package c, package c is implicitly included in the resulting shared library (as
specified by "Go Execution Modes"). But if c depends on b, linking against this
shared library hangs, because the go tool doesn't know when computing c's
dependencies that c is part of the same shared library as c.

Fix this by tracking the shared library a package *is* in separately from the
shared library a package has been explicitly linked into.

Fixes #13044

Change-Id: Iacfedab24ae9731ed53d225678b447a2a888823c
Reviewed-on: https://go-review.googlesource.com/16338
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/build.go