CL 621995 disrupted the behavior
introduced by CL 450739, now restore it.
Fixes #75340
Change-Id: Icd1a0eb970876995f9446e0547ceb9e78990f6ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/703555
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Ian Alexander <jitsu@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
if buildcfg.DefaultCGO_ENABLED == "1" {
defaultCgoEnabled = true
} else if buildcfg.DefaultCGO_ENABLED == "0" {
- } else if runtime.GOARCH == ctxt.GOARCH && runtime.GOOS == ctxt.GOOS {
+ }
+ 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