mirror of
https://github.com/golang/go
synced 2024-11-07 09:46:12 -07:00
cmd/dist: add needCC comment, fix needCC
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>
This commit is contained in:
parent
40a6e2dae5
commit
8b3dc5399d
4
src/cmd/dist/build.go
vendored
4
src/cmd/dist/build.go
vendored
@ -1742,8 +1742,10 @@ var firstClass = map[string]bool{
|
||||
"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() {
|
||||
|
Loading…
Reference in New Issue
Block a user