From 8bd803fd4ea3a549a9124f5a4e18af9596ef35df Mon Sep 17 00:00:00 2001 From: Than McIntosh Date: Tue, 4 Oct 2022 09:00:31 -0400 Subject: cmd/internal/sys: migrate support.go functions to new internal pkg Separate out the functions from cmd/internal/sys/support.go and migrate them to a new package internal/platform, so that functions such as "RaceDetectorSupported" can be called from tests in std as well as in cmd. This isn't a complete move of everything in cmd/internal/sys; there are still many functions left. The original version of this CL (patch set 1) called the new package "internal/sys", but for packages that needed both "internal/sys" and "cmd/internal/sys" the import of the former had to be done with a different name, which was confusing and also required a hack in cmd/dist. Updates #56006. Change-Id: I866d62e75adbf3a640a06e2c7386a6e9e2a18d91 Reviewed-on: https://go-review.googlesource.com/c/go/+/438475 Reviewed-by: Bryan Mills TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui Run-TryBot: Than McIntosh --- src/cmd/objdump/objdump_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cmd/objdump/objdump_test.go') diff --git a/src/cmd/objdump/objdump_test.go b/src/cmd/objdump/objdump_test.go index 86e904dcd5..bbf942503a 100644 --- a/src/cmd/objdump/objdump_test.go +++ b/src/cmd/objdump/objdump_test.go @@ -6,10 +6,10 @@ package main import ( "cmd/internal/notsha256" - "cmd/internal/sys" "flag" "fmt" "go/build" + "internal/platform" "internal/testenv" "os" "os/exec" @@ -287,7 +287,7 @@ func TestDisasmExtld(t *testing.T) { } func TestDisasmPIE(t *testing.T) { - if !sys.BuildModeSupported("gc", "pie", runtime.GOOS, runtime.GOARCH) { + if !platform.BuildModeSupported("gc", "pie", runtime.GOOS, runtime.GOARCH) { t.Skipf("skipping on %s/%s, PIE buildmode not supported", runtime.GOOS, runtime.GOARCH) } t.Parallel() -- cgit v1.3