aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dist
diff options
context:
space:
mode:
authorThan McIntosh <thanm@google.com>2022-10-04 09:00:31 -0400
committerThan McIntosh <thanm@google.com>2022-10-04 18:08:15 +0000
commit8bd803fd4ea3a549a9124f5a4e18af9596ef35df (patch)
tree078970e7e27d0f3d48e0dfae4d7a5ba49bb3c01c /src/cmd/dist
parentdfd8aa461be982533e01867ab002fb83ba3cc943 (diff)
downloadgo-8bd803fd4ea3a549a9124f5a4e18af9596ef35df.tar.xz
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>
Diffstat (limited to 'src/cmd/dist')
-rw-r--r--src/cmd/dist/buildtool.go1
-rw-r--r--src/cmd/dist/test.go2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go
index 755ec61aff..828e93aa4c 100644
--- a/src/cmd/dist/buildtool.go
+++ b/src/cmd/dist/buildtool.go
@@ -67,6 +67,7 @@ var bootstrapDirs = []string{
"internal/pkgbits",
"internal/race",
"internal/saferio",
+ "internal/platform",
"internal/unsafeheader",
"internal/xcoff",
"math/big",
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index 7f85fc1d2d..fb0f1e1352 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -1711,7 +1711,7 @@ func (t *tester) runPrecompiledStdTest(timeout time.Duration) error {
}
// raceDetectorSupported is a copy of the function
-// cmd/internal/sys.RaceDetectorSupported, which can't be used here
+// internal/platform.RaceDetectorSupported, which can't be used here
// because cmd/dist has to be buildable by Go 1.4.
// The race detector only supports 48-bit VMA on arm64. But we don't have
// a good solution to check VMA size(See https://golang.org/issue/29948)