From 4d59d1fcb1502ea9bb8168f39b58eb7eecbebcc2 Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Fri, 13 Mar 2015 22:12:09 -0400 Subject: [PATCH] cmd/dist: enable external linking test for windows/amd64 Fixes #4069. Change-Id: I2d2ea233f976aab3f356f9b508cdd246d5013e31 Signed-off-by: Shenghou Ma Reviewed-on: https://go-review.googlesource.com/7535 Reviewed-by: Ian Lance Taylor Reviewed-by: Alex Brainman --- src/cmd/dist/test.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index 486412afbb8..b0ffdcfbc0e 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -351,7 +351,7 @@ func (t *tester) extLink() bool { "linux-386", "linux-amd64", "linux-arm", "netbsd-386", "netbsd-amd64", "openbsd-386", "openbsd-amd64", - "windows-386": + "windows-386", "windows-amd64": return true case "darwin-386", "darwin-amd64": // linkmode=external fails on OS X 10.6 and earlier == Darwin @@ -370,10 +370,7 @@ func (t *tester) cgoTest() error { env := mergeEnvLists([]string{"GOTRACEBACK=2"}, os.Environ()) iOS := t.goos == "darwin" && (t.goarch == "arm" || t.goarch == "arm64") - switch { - case t.goos == "windows" && t.goarch != "386": - fallthrough - case t.goos == "android", iOS: + if t.goos == "android" || iOS { cmd := t.dirCmd("misc/cgo/test", "go", "test") cmd.Env = env return cmd.Run() @@ -398,7 +395,7 @@ func (t *tester) cgoTest() error { return err } case "darwin-386", "darwin-amd64", - "windows-386": + "windows-386", "windows-amd64": if t.extLink() { cmd := t.dirCmd("misc/cgo/test", "go", "test", "-ldflags", "-linkmode=external") cmd.Env = env