aboutsummaryrefslogtreecommitdiff
path: root/src/internal/testenv
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/testenv')
-rw-r--r--src/internal/testenv/testenv.go14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/internal/testenv/testenv.go b/src/internal/testenv/testenv.go
index 7b435fd002..fe34a92d9c 100644
--- a/src/internal/testenv/testenv.go
+++ b/src/internal/testenv/testenv.go
@@ -16,6 +16,7 @@ import (
"flag"
"fmt"
"internal/cfg"
+ "internal/platform"
"os"
"os/exec"
"path/filepath"
@@ -295,19 +296,8 @@ func MustHaveCGO(t testing.TB) {
// CanInternalLink reports whether the current system can link programs with
// internal linking.
-// (This is the opposite of cmd/internal/sys.MustLinkExternal. Keep them in sync.)
func CanInternalLink() bool {
- switch runtime.GOOS {
- case "android":
- if runtime.GOARCH != "arm64" {
- return false
- }
- case "ios":
- if runtime.GOARCH == "arm64" {
- return false
- }
- }
- return true
+ return !platform.MustLinkExternal(runtime.GOOS, runtime.GOARCH)
}
// MustInternalLink checks that the current system can link programs with internal