mirror of
https://github.com/golang/go
synced 2024-11-02 08:01:26 +00:00
cmd/dist: display first class port status in json output
Fixes #38874 Change-Id: I819dd008fd6869d335888b4aa03dcf739da9a9a4 Reviewed-on: https://go-review.googlesource.com/c/go/+/320069 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Trust: Daniel Martí <mvdan@mvdan.cc>
This commit is contained in:
parent
4fb10b2118
commit
e4d7525c3e
1 changed files with 15 additions and 1 deletions
16
src/cmd/dist/build.go
vendored
16
src/cmd/dist/build.go
vendored
|
@ -1607,6 +1607,18 @@ var incomplete = map[string]bool{
|
||||||
"linux/sparc64": true,
|
"linux/sparc64": true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// List of platforms which are first class ports. See golang.org/issue/38874.
|
||||||
|
var firstClass = map[string]bool{
|
||||||
|
"darwin/amd64": true,
|
||||||
|
"darwin/arm64": true,
|
||||||
|
"linux/386": true,
|
||||||
|
"linux/amd64": true,
|
||||||
|
"linux/arm": true,
|
||||||
|
"linux/arm64": true,
|
||||||
|
"windows/386": true,
|
||||||
|
"windows/amd64": true,
|
||||||
|
}
|
||||||
|
|
||||||
func needCC() bool {
|
func needCC() bool {
|
||||||
switch os.Getenv("CGO_ENABLED") {
|
switch os.Getenv("CGO_ENABLED") {
|
||||||
case "1":
|
case "1":
|
||||||
|
@ -1743,6 +1755,7 @@ func cmdlist() {
|
||||||
GOOS string
|
GOOS string
|
||||||
GOARCH string
|
GOARCH string
|
||||||
CgoSupported bool
|
CgoSupported bool
|
||||||
|
FirstClass bool
|
||||||
}
|
}
|
||||||
var results []jsonResult
|
var results []jsonResult
|
||||||
for _, p := range plats {
|
for _, p := range plats {
|
||||||
|
@ -1750,7 +1763,8 @@ func cmdlist() {
|
||||||
results = append(results, jsonResult{
|
results = append(results, jsonResult{
|
||||||
GOOS: fields[0],
|
GOOS: fields[0],
|
||||||
GOARCH: fields[1],
|
GOARCH: fields[1],
|
||||||
CgoSupported: cgoEnabled[p]})
|
CgoSupported: cgoEnabled[p],
|
||||||
|
FirstClass: firstClass[p]})
|
||||||
}
|
}
|
||||||
out, err := json.MarshalIndent(results, "", "\t")
|
out, err := json.MarshalIndent(results, "", "\t")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue