cmd/link: make DynlinkingGo a method

This will allow it to depend on whether plugin.Open is a symbol to be
linked in.

Change-Id: Ie9aa4216f2510fe8b10bc4665c8b19622b7122ea
Reviewed-on: https://go-review.googlesource.com/27819
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
David Crawshaw 2016-08-25 21:06:10 -04:00
parent 7f27f1dfdd
commit 8f3c8a33fa
16 changed files with 36 additions and 36 deletions

View file

@ -63,7 +63,7 @@ func deadcode(ctxt *Link) {
methSym := Linkrlookup(ctxt, "reflect.Value.Method", 0)
reflectSeen := false
if DynlinkingGo() {
if ctxt.DynlinkingGo() {
// Exported methods may satisfy interfaces we don't know
// about yet when dynamically linking.
reflectSeen = true