Skip to content

Commit 4d59d1f

Browse files
committed
cmd/dist: enable external linking test for windows/amd64
Fixes #4069. Change-Id: I2d2ea233f976aab3f356f9b508cdd246d5013e31 Signed-off-by: Shenghou Ma <[email protected]> Reviewed-on: https://go-review.googlesource.com/7535 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Alex Brainman <[email protected]>
1 parent e7df053 commit 4d59d1f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/cmd/dist/test.go

+3-6
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ func (t *tester) extLink() bool {
351351
"linux-386", "linux-amd64", "linux-arm",
352352
"netbsd-386", "netbsd-amd64",
353353
"openbsd-386", "openbsd-amd64",
354-
"windows-386":
354+
"windows-386", "windows-amd64":
355355
return true
356356
case "darwin-386", "darwin-amd64":
357357
// linkmode=external fails on OS X 10.6 and earlier == Darwin
@@ -370,10 +370,7 @@ func (t *tester) cgoTest() error {
370370
env := mergeEnvLists([]string{"GOTRACEBACK=2"}, os.Environ())
371371

372372
iOS := t.goos == "darwin" && (t.goarch == "arm" || t.goarch == "arm64")
373-
switch {
374-
case t.goos == "windows" && t.goarch != "386":
375-
fallthrough
376-
case t.goos == "android", iOS:
373+
if t.goos == "android" || iOS {
377374
cmd := t.dirCmd("misc/cgo/test", "go", "test")
378375
cmd.Env = env
379376
return cmd.Run()
@@ -398,7 +395,7 @@ func (t *tester) cgoTest() error {
398395
return err
399396
}
400397
case "darwin-386", "darwin-amd64",
401-
"windows-386":
398+
"windows-386", "windows-amd64":
402399
if t.extLink() {
403400
cmd := t.dirCmd("misc/cgo/test", "go", "test", "-ldflags", "-linkmode=external")
404401
cmd.Env = env

0 commit comments

Comments
 (0)