]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: import runtime/cgo into darwin/arm64 tests
authorDavid Crawshaw <crawshaw@golang.org>
Mon, 27 Jul 2015 22:02:45 +0000 (18:02 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Tue, 28 Jul 2015 03:19:25 +0000 (03:19 +0000)
Until cl/12721 and cl/12574, all standard library tests included
runtime/cgo on darwin/arm64 by virtue of package os including it. Now
that is no longer true, runtime/cgo needs to be added by the go tool
just as it is for darwin/arm. (This installs the Mach exception
handler used to properly handle EXC_BAD_ACCESS.)

Fixes #11901

Change-Id: I991525f46eca5b0750b93595579ebc0ff10e47eb
Reviewed-on: https://go-review.googlesource.com/12723
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/go/test.go

index bae6e04b530fe1169998ece2d199bffd9e3ba112..668665053dd3b056730dd462c090757be37a65bd 100644 (file)
@@ -804,8 +804,10 @@ func (b *builder) test(p *Package) (buildAction, runAction, printAction *action,
                recompileForTest(pmain, p, ptest, testDir)
        }
 
-       if buildContext.GOOS == "darwin" && buildContext.GOARCH == "arm" {
-               t.NeedCgo = true
+       if buildContext.GOOS == "darwin" {
+               if buildContext.GOARCH == "arm" || buildContext.GOARCH == "arm64" {
+                       t.NeedCgo = true
+               }
        }
 
        for _, cp := range pmain.imports {