mirror of
https://github.com/golang/go
synced 2024-11-27 05:21:22 -07:00
cmd/dist: list only supported platforms
Introduce an incomplete map in dist alongside cgoEnabled and filter out the incomplete ports in 'dist list'. Fixes #28944 Change-Id: I15aae56aec570e1cd9e28906900cd5ba0db77811 Reviewed-on: https://go-review.googlesource.com/c/155839 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
2e217fa726
commit
5ec5c5741e
10
src/cmd/dist/build.go
vendored
10
src/cmd/dist/build.go
vendored
@ -1458,6 +1458,13 @@ var cgoEnabled = map[string]bool{
|
|||||||
"windows/arm": false,
|
"windows/arm": false,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// List of platforms which are supported but not complete yet. These get
|
||||||
|
// filtered out of cgoEnabled for 'dist list'. See golang.org/issue/28944
|
||||||
|
var incomplete = map[string]bool{
|
||||||
|
"linux/riscv64": true,
|
||||||
|
"linux/sparc64": true,
|
||||||
|
}
|
||||||
|
|
||||||
func needCC() bool {
|
func needCC() bool {
|
||||||
switch os.Getenv("CGO_ENABLED") {
|
switch os.Getenv("CGO_ENABLED") {
|
||||||
case "1":
|
case "1":
|
||||||
@ -1576,6 +1583,9 @@ func cmdlist() {
|
|||||||
|
|
||||||
var plats []string
|
var plats []string
|
||||||
for p := range cgoEnabled {
|
for p := range cgoEnabled {
|
||||||
|
if incomplete[p] {
|
||||||
|
continue
|
||||||
|
}
|
||||||
plats = append(plats, p)
|
plats = append(plats, p)
|
||||||
}
|
}
|
||||||
sort.Strings(plats)
|
sort.Strings(plats)
|
||||||
|
3
src/cmd/dist/test.go
vendored
3
src/cmd/dist/test.go
vendored
@ -212,6 +212,9 @@ func (t *tester) run() {
|
|||||||
if t.failed {
|
if t.failed {
|
||||||
fmt.Println("\nFAILED")
|
fmt.Println("\nFAILED")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
} else if incomplete[goos+"/"+goarch] {
|
||||||
|
fmt.Println("\nFAILED (incomplete port)")
|
||||||
|
os.Exit(1)
|
||||||
} else if t.partial {
|
} else if t.partial {
|
||||||
fmt.Println("\nALL TESTS PASSED (some were excluded)")
|
fmt.Println("\nALL TESTS PASSED (some were excluded)")
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user