This was missed in CL 475377.
Change-Id: I4e8c4c0459a92029a3f448c1e4172d3343280c57
Reviewed-on: https://go-review.googlesource.com/c/go/+/475958
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
"windows/amd64": true,
}
+// We only need CC if cgo is forced on, or if the platform requires external linking.
+// Otherwise the go command will automatically disable it.
func needCC() bool {
- return os.Getenv("CGO_ENABLED") == "1"
+ return os.Getenv("CGO_ENABLED") == "1" || mustLinkExternal(gohostos, gohostarch, false)
}
func checkCC() {