Skip to content

Commit

Permalink
cmd/dist: enable cgo on windows/arm64
Browse files Browse the repository at this point in the history
Change-Id: I4d470e2af1bfb4fba004a6f3e00a163a575593da
Reviewed-on: https://go-review.googlesource.com/c/go/+/312047
Trust: Russ Cox <[email protected]>
Reviewed-by: Cherry Zhang <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
rsc committed Apr 23, 2021
1 parent a6d3dc4 commit b8fed48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cmd/dist/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ var cgoEnabled = map[string]bool{
"windows/386": true,
"windows/amd64": true,
"windows/arm": false,
"windows/arm64": false,
"windows/arm64": true,
}

// List of platforms which are supported but not complete yet. These get
Expand Down
6 changes: 4 additions & 2 deletions src/cmd/dist/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,9 @@ func (t *tester) internalLink() bool {
if goos == "ios" {
return false
}
if goos == "windows" && goarch == "arm64" {
return false
}
// Internally linking cgo is incomplete on some architectures.
// https://golang.org/issue/10373
// https://golang.org/issue/14449
Expand Down Expand Up @@ -1108,8 +1111,7 @@ func (t *tester) cgoTest(dt *distTest) error {
cmd := t.addCmd(dt, "misc/cgo/test", t.goTest())
cmd.Env = append(os.Environ(), "GOFLAGS=-ldflags=-linkmode=auto")

// Skip internal linking cases on arm64 to support GCC-9.4 and above,
// only for linux, conservatively.
// Skip internal linking cases on linux/arm64 to support GCC-9.4 and above.
// See issue #39466.
skipInternalLink := goarch == "arm64" && goos == "linux"

Expand Down

0 comments on commit b8fed48

Please sign in to comment.