mirror of
https://github.com/golang/go
synced 2024-11-19 03:04:42 -07:00
cmd/dist: enable external linking test for windows/386
Signed-off-by: Shenghou Ma <minux@golang.org> Change-Id: I2d2ea233f976aab3f356f9b508cdd246d5013e2f Reviewed-on: https://go-review.googlesource.com/7284 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
This commit is contained in:
parent
04642e92ac
commit
484d9399de
11
src/cmd/dist/test.go
vendored
11
src/cmd/dist/test.go
vendored
@ -350,7 +350,8 @@ func (t *tester) extLink() bool {
|
||||
"freebsd-386", "freebsd-amd64", "freebsd-arm",
|
||||
"linux-386", "linux-amd64", "linux-arm",
|
||||
"netbsd-386", "netbsd-amd64",
|
||||
"openbsd-386", "openbsd-amd64":
|
||||
"openbsd-386", "openbsd-amd64",
|
||||
"windows-386":
|
||||
return true
|
||||
case "darwin-386", "darwin-amd64":
|
||||
// linkmode=external fails on OS X 10.6 and earlier == Darwin
|
||||
@ -369,7 +370,10 @@ func (t *tester) cgoTest() error {
|
||||
env := mergeEnvLists([]string{"GOTRACEBACK=2"}, os.Environ())
|
||||
|
||||
iOS := t.goos == "darwin" && (t.goarch == "arm" || t.goarch == "arm64")
|
||||
if t.gohostos == "windows" || t.goos == "android" || iOS {
|
||||
switch {
|
||||
case t.goos == "windows" && t.goarch != "386":
|
||||
fallthrough
|
||||
case t.goos == "android", iOS:
|
||||
cmd := t.dirCmd("misc/cgo/test", "go", "test")
|
||||
cmd.Env = env
|
||||
return cmd.Run()
|
||||
@ -393,7 +397,8 @@ func (t *tester) cgoTest() error {
|
||||
if err := cmd.Run(); err != nil {
|
||||
return err
|
||||
}
|
||||
case "darwin-386", "darwin-amd64":
|
||||
case "darwin-386", "darwin-amd64",
|
||||
"windows-386":
|
||||
if t.extLink() {
|
||||
cmd := t.dirCmd("misc/cgo/test", "go", "test", "-ldflags", "-linkmode=external")
|
||||
cmd.Env = env
|
||||
|
Loading…
Reference in New Issue
Block a user