]> Cypherpunks repositories - gostls13.git/commit
cmd/go: -ldflags=-linkmode=external requires runtime/cgo
authorIan Lance Taylor <iant@golang.org>
Thu, 10 Nov 2016 17:59:42 +0000 (09:59 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 10 Nov 2016 18:46:00 +0000 (18:46 +0000)
commitb77bff97c4817656dd3bf49f14d1834c411be084
tree4150a5a07eb2bc24577fcabce756efaae751c334
parenta0d2e9699f1cc83a854c52843ff15d07f83bce47
cmd/go: -ldflags=-linkmode=external requires runtime/cgo

We add runtime/cgo to the list of import paths for various cases that
imply external linking mode, but before this change we did not add for
an explicit request of external linking mode. This fixes the case where
you are using a non-default buildmode that implies a different
compilation option (for example, -buildmode=pie implies -shared) and the
runtime/cgo package for that option is stale.

No test, as I'm not sure how to write one. It would require forcing a
stale runtime/cgo.

Change-Id: Id0409c7274ce67fe15d910baf587d3220cb53d83
Reviewed-on: https://go-review.googlesource.com/33070
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
src/cmd/go/pkg.go