mirror of
https://github.com/golang/go.git
synced 2026-04-04 18:30:22 +09:00
Revert "cmd/go: disable cgo by default if CC unset and DefaultCC doesn't exist"
This reverts commit c2d85eb999.
Reason for revert: change was incorrect. ignores setting of CGO_ENABLED in some cases
Change-Id: I8e6e68dd600be5306a247a3314f4b57175f1aa56
Reviewed-on: https://go-review.googlesource.com/c/go/+/705495
Auto-Submit: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Ian Alexander <jitsu@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
committed by
Gopher Robot
parent
ee7bf06cb3
commit
51dc5bfe6c
@@ -145,8 +145,7 @@ func defaultContext() build.Context {
|
||||
if buildcfg.DefaultCGO_ENABLED == "1" {
|
||||
defaultCgoEnabled = true
|
||||
} else if buildcfg.DefaultCGO_ENABLED == "0" {
|
||||
}
|
||||
if runtime.GOARCH == ctxt.GOARCH && runtime.GOOS == ctxt.GOOS {
|
||||
} else if runtime.GOARCH == ctxt.GOARCH && runtime.GOOS == ctxt.GOOS {
|
||||
defaultCgoEnabled = platform.CgoSupported(ctxt.GOOS, ctxt.GOARCH)
|
||||
// Use built-in default cgo setting for GOOS/GOARCH.
|
||||
// Note that ctxt.GOOS/GOARCH are derived from the preference list
|
||||
|
||||
Reference in New Issue
Block a user