diff --git a/src/cmd/cgo/internal/test/issue4029.c b/src/cmd/cgo/internal/test/issue4029.c index 212d6922f8..7a8fdc11b4 100644 --- a/src/cmd/cgo/internal/test/issue4029.c +++ b/src/cmd/cgo/internal/test/issue4029.c @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !windows && !static && (!darwin || (!internal_pie && !arm64)) +//go:build !windows && !static && !(darwin && internal) #include #include diff --git a/src/cmd/cgo/internal/test/issue4029.go b/src/cmd/cgo/internal/test/issue4029.go index 686b7679f3..506c999bdb 100644 --- a/src/cmd/cgo/internal/test/issue4029.go +++ b/src/cmd/cgo/internal/test/issue4029.go @@ -2,11 +2,10 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !windows && !static && (!darwin || (!internal_pie && !arm64)) +//go:build !windows && !static && !(darwin && internal) -// Excluded in darwin internal linking PIE mode, as dynamic export is not -// supported. -// Excluded in internal linking mode on darwin/arm64, as it is always PIE. +// Excluded in darwin internal linking PIE (which is the default) mode, +// as dynamic export is not supported. package cgotest diff --git a/src/cmd/cgo/internal/test/issue4029w.go b/src/cmd/cgo/internal/test/issue4029w.go index 91dad6abcb..aa4c2f59bd 100644 --- a/src/cmd/cgo/internal/test/issue4029w.go +++ b/src/cmd/cgo/internal/test/issue4029w.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build windows || static || (darwin && internal_pie) || (darwin && arm64) +//go:build windows || static || (darwin && internal) package cgotest diff --git a/src/internal/platform/supported.go b/src/internal/platform/supported.go index 230a952d2d..7fc3bfd25d 100644 --- a/src/internal/platform/supported.go +++ b/src/internal/platform/supported.go @@ -245,7 +245,7 @@ func DefaultPIE(goos, goarch string, isRace bool) bool { } return true case "darwin": - return goarch == "arm64" + return true } return false }