aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/api/goapi.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/api/goapi.go')
-rw-r--r--src/cmd/api/goapi.go11
1 files changed, 9 insertions, 2 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 {