]> Cypherpunks repositories - gostls13.git/commit
cmd/go: ignore -linkmode=external during cmd/cgo build
authorRuss Cox <rsc@golang.org>
Sun, 16 Jul 2017 17:42:12 +0000 (13:42 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 3 Oct 2017 19:58:10 +0000 (19:58 +0000)
commitb78bce08e3715aed96109a67849bbe6c334515f3
tree7859de6dab28c61716f186fe5706d0be7ebc30f8
parent3cdf6100f1cac9b3ff30c790d145240d6f5a2f8a
cmd/go: ignore -linkmode=external during cmd/cgo build

cmd/cgo is special among the build tools because it is (re)built on demand
when needed for a package using cgo, to avoid additional bootstrap logic
elsewhere. (This is in contrast to cmd/compile, cmd/link, and so on, which
must be specially built before even invoking the go command.)

When the go command starts using content-based decisions about staleness,
it is important that the build of cmd/cgo never use -linkmode=external,
because that depends on runtime/cgo, which in turn depends on cmd/cgo.

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