]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/sys: migrate support.go functions to new internal pkg
authorThan McIntosh <thanm@google.com>
Tue, 4 Oct 2022 13:00:31 +0000 (09:00 -0400)
committerThan McIntosh <thanm@google.com>
Tue, 4 Oct 2022 18:08:15 +0000 (18:08 +0000)
commit8bd803fd4ea3a549a9124f5a4e18af9596ef35df
tree078970e7e27d0f3d48e0dfae4d7a5ba49bb3c01c
parentdfd8aa461be982533e01867ab002fb83ba3cc943
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 <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
19 files changed:
src/cmd/compile/internal/base/flag.go
src/cmd/dist/buildtool.go
src/cmd/dist/test.go
src/cmd/go/go_test.go
src/cmd/go/internal/load/pkg.go
src/cmd/go/internal/test/test.go
src/cmd/go/internal/work/gc.go
src/cmd/go/internal/work/init.go
src/cmd/go/script_test.go
src/cmd/internal/sys/supported_test.go [deleted file]
src/cmd/link/elf_test.go
src/cmd/link/internal/ld/config.go
src/cmd/link/link_test.go
src/cmd/objdump/objdump_test.go
src/go/build/deps_test.go
src/internal/fuzz/counters_unsupported.go
src/internal/fuzz/sys_unimplemented.go
src/internal/platform/supported.go [moved from src/cmd/internal/sys/supported.go with 97% similarity]
src/internal/testenv/testenv.go