mirror of https://github.com/golang/go.git
[release-branch.go1.4] go/build: don't enable cgo for any system by default
The 1.4 branch is now used only for building more recent releases. Enabling cgo is not required for that, and tends to cause problems as systems and compilers change. Updates #21054 Change-Id: I498f493e3ac32bcea55725cf5de3b3172f0fd5db Reviewed-on: https://go-review.googlesource.com/65450 Reviewed-by: Joe Tsai <joetsai@google.com> Run-TryBot: Joe Tsai <joetsai@google.com>
This commit is contained in:
parent
a3310f9981
commit
d76c7d5a31
|
|
@ -256,28 +256,9 @@ func (ctxt *Context) SrcDirs() []string {
|
|||
// if set, or else the compiled code's GOARCH, GOOS, and GOROOT.
|
||||
var Default Context = defaultContext()
|
||||
|
||||
var cgoEnabled = map[string]bool{
|
||||
"darwin/386": true,
|
||||
"darwin/amd64": true,
|
||||
"dragonfly/386": true,
|
||||
"dragonfly/amd64": true,
|
||||
"freebsd/386": true,
|
||||
"freebsd/amd64": true,
|
||||
"freebsd/arm": true,
|
||||
"linux/386": true,
|
||||
"linux/amd64": true,
|
||||
"linux/arm": true,
|
||||
"android/386": true,
|
||||
"android/amd64": true,
|
||||
"android/arm": true,
|
||||
"netbsd/386": true,
|
||||
"netbsd/amd64": true,
|
||||
"netbsd/arm": true,
|
||||
"openbsd/386": true,
|
||||
"openbsd/amd64": true,
|
||||
"windows/386": true,
|
||||
"windows/amd64": true,
|
||||
}
|
||||
// On the 1.4 branch, cgo is not enabled by default for any system.
|
||||
// Set CGO_ENABLED=1 when running make.bash to enable cgo.
|
||||
var cgoEnabled = map[string]bool{}
|
||||
|
||||
func defaultContext() Context {
|
||||
var c Context
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
# CGO_ENABLED: Controls cgo usage during the build. Set it to 1
|
||||
# to include all cgo related files, .c and .go file with "cgo"
|
||||
# build directive, in the build. Set it to 0 to ignore them.
|
||||
# The default for this release is 0.
|
||||
#
|
||||
# GO_EXTLINK_ENABLED: Set to 1 to invoke the host linker when building
|
||||
# packages that use cgo. Set to 0 to do all linking internally. This
|
||||
|
|
|
|||
Loading…
Reference in New Issue