Commit fd9b9c31 authored by David Crawshaw's avatar David Crawshaw

cmd/go: import runtime/cgo into darwin/arm64 tests

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/12723Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent 22936858
......@@ -804,9 +804,11 @@ func (b *builder) test(p *Package) (buildAction, runAction, printAction *action,
recompileForTest(pmain, p, ptest, testDir)
}
if buildContext.GOOS == "darwin" && buildContext.GOARCH == "arm" {
if buildContext.GOOS == "darwin" {
if buildContext.GOARCH == "arm" || buildContext.GOARCH == "arm64" {
t.NeedCgo = true
}
}
for _, cp := range pmain.imports {
if len(cp.coverVars) > 0 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment