Skip to content

Commit

Permalink
cmd/dist: enable external linking test for windows/amd64
Browse files Browse the repository at this point in the history
Fixes #4069.

Change-Id: I2d2ea233f976aab3f356f9b508cdd246d5013e31
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/7535
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
  • Loading branch information
minux committed Mar 24, 2015
1 parent e7df053 commit 4d59d1f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/cmd/dist/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand All @@ -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
Expand Down

0 comments on commit 4d59d1f

Please sign in to comment.