aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/api
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2020-04-02 22:44:25 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2020-04-04 16:49:40 +0000
commit9f40f9f4d3e9e5a08cfd1df5af23a6f61d67d408 (patch)
tree77397fdab07d486e668de43be5451fd329d1da97 /src/cmd/api
parentfff7509d472778cae5e652dbe2479929c666c24f (diff)
downloadgo-9f40f9f4d3e9e5a08cfd1df5af23a6f61d67d408.tar.gz
go-9f40f9f4d3e9e5a08cfd1df5af23a6f61d67d408.zip
cmd/dist: remove darwin/386, darwin/arm as valid ports
This only removes the ability to build it, and removes it as a src/buildall.bash target (which uses go tool dist list). Now: $ go tool dist list | grep ^darwin darwin/amd64 darwin/arm64 After this, remaining is removing leftover port--specific code in the tree. Updates #37610 Updates #37611 Change-Id: I00f03b2355c2e152f75e57abd3063be243529d2d Reviewed-on: https://go-review.googlesource.com/c/go/+/226985 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org>
Diffstat (limited to 'src/cmd/api')
-rw-r--r--src/cmd/api/goapi.go11
-rw-r--r--src/cmd/api/goapi_test.go1
2 files changed, 9 insertions, 3 deletions
diff --git a/src/cmd/api/goapi.go b/src/cmd/api/goapi.go
index 55f3e10991..9874b29292 100644
--- a/src/cmd/api/goapi.go
+++ b/src/cmd/api/goapi.go
@@ -60,8 +60,6 @@ var contexts = []*build.Context{
{GOOS: "linux", GOARCH: "amd64"},
{GOOS: "linux", GOARCH: "arm", CgoEnabled: true},
{GOOS: "linux", GOARCH: "arm"},
- {GOOS: "darwin", GOARCH: "386", CgoEnabled: true},
- {GOOS: "darwin", GOARCH: "386"},
{GOOS: "darwin", GOARCH: "amd64", CgoEnabled: true},
{GOOS: "darwin", GOARCH: "amd64"},
{GOOS: "windows", GOARCH: "amd64"},
@@ -252,6 +250,13 @@ func featureWithoutContext(f string) string {
return spaceParensRx.ReplaceAllString(f, "")
}
+// portRemoved reports whether the given port-specific API feature is
+// okay to no longer exist because its port was removed.
+func portRemoved(feature string) bool {
+ return strings.Contains(feature, "(darwin-386)") ||
+ strings.Contains(feature, "(darwin-386-cgo)")
+}
+
func compareAPI(w io.Writer, features, required, optional, exception []string, allowAdd bool) (ok bool) {
ok = true
@@ -279,6 +284,8 @@ func compareAPI(w io.Writer, features, required, optional, exception []string, a
// acknowledged by being in the file
// "api/except.txt". No need to print them out
// here.
+ } else if portRemoved(feature) {
+ // okay.
} else if featureSet[featureWithoutContext(feature)] {
// okay.
} else {
diff --git a/src/cmd/api/goapi_test.go b/src/cmd/api/goapi_test.go
index 282f26f708..eaccc5ceb5 100644
--- a/src/cmd/api/goapi_test.go
+++ b/src/cmd/api/goapi_test.go
@@ -140,7 +140,6 @@ func TestCompareAPI(t *testing.T) {
name: "contexts reconverging",
required: []string{
"A",
- "pkg syscall (darwin-386), type RawSockaddrInet6 struct",
"pkg syscall (darwin-amd64), type RawSockaddrInet6 struct",
},
features: []string{