mirror of https://github.com/golang/go.git
cmd/dist: add curiously missing GOOS/GOARCH combinations
The cmd/dist cgo_test enumerates a large number of platforms in various special cases. Some combinations are suspiciously absent. This CL completes the combinations. I've confirmed using trybots that the newly-enabled tests pass on android/* (this is not surprising because the gohostos is never "android" anyway), windows/arm64, linux/ppc64 (no cgo), linux/loong64 (except for one test, filed #56623), linux/mips*, netbsd/arm (except for one test, filed #56629), and netbsd/arm64. The windows/arm builder is out to lunch, so I'm assuming that works. Since netbsd/arm and arm64 mostly passed these tests, I've also enabled them on netbsd/386 and netbsd/amd64, where they seem to work fine as well. Preparation for #37486. Change-Id: I04c3348e4f422d74d51e714647ca3db379e6e919 Reviewed-on: https://go-review.googlesource.com/c/go/+/448016 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Austin Clements <austin@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
38218f3987
commit
0266671e3d
|
|
@ -1183,7 +1183,7 @@ func (t *tester) cgoTest(dt *distTest) error {
|
|||
pair := gohostos + "-" + goarch
|
||||
switch pair {
|
||||
case "darwin-amd64", "darwin-arm64",
|
||||
"windows-386", "windows-amd64":
|
||||
"windows-386", "windows-amd64", "windows-arm", "windows-arm64":
|
||||
// test linkmode=external, but __thread not supported, so skip testtls.
|
||||
if !t.extLink() {
|
||||
break
|
||||
|
|
@ -1201,11 +1201,11 @@ func (t *tester) cgoTest(dt *distTest) error {
|
|||
}
|
||||
|
||||
case "aix-ppc64",
|
||||
"android-arm", "android-arm64",
|
||||
"android-386", "android-amd64", "android-arm", "android-arm64",
|
||||
"dragonfly-amd64",
|
||||
"freebsd-386", "freebsd-amd64", "freebsd-arm", "freebsd-riscv64",
|
||||
"linux-386", "linux-amd64", "linux-arm", "linux-arm64", "linux-ppc64le", "linux-riscv64", "linux-s390x",
|
||||
"netbsd-386", "netbsd-amd64",
|
||||
"linux-386", "linux-amd64", "linux-arm", "linux-arm64", "linux-loong64", "linux-mips", "linux-mipsle", "linux-mips64", "linux-mips64le", "linux-ppc64", "linux-ppc64le", "linux-riscv64", "linux-s390x",
|
||||
"netbsd-386", "netbsd-amd64", "netbsd-arm", "netbsd-arm64",
|
||||
"openbsd-386", "openbsd-amd64", "openbsd-arm", "openbsd-arm64", "openbsd-mips64":
|
||||
|
||||
cmd := t.addCmd(dt, "misc/cgo/test", t.goTest(), "-ldflags=-linkmode=external", ".")
|
||||
|
|
@ -1217,7 +1217,7 @@ func (t *tester) cgoTest(dt *distTest) error {
|
|||
t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-ldflags", "-linkmode=external", ".")
|
||||
|
||||
switch pair {
|
||||
case "aix-ppc64", "netbsd-386", "netbsd-amd64":
|
||||
case "aix-ppc64":
|
||||
// no static linking
|
||||
case "freebsd-arm":
|
||||
// -fPIC compiled tls code will use __tls_get_addr instead
|
||||
|
|
@ -1232,7 +1232,8 @@ func (t *tester) cgoTest(dt *distTest) error {
|
|||
if err := cmd.Run(); err != nil {
|
||||
fmt.Println("No support for static linking found (lacks libc.a?), skip cgo static linking test.")
|
||||
} else {
|
||||
if goos != "android" {
|
||||
if goos != "android" && pair != "netbsd-arm" {
|
||||
// TODO(#56629): Why does this fail on netbsd-arm?
|
||||
t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, ".")
|
||||
}
|
||||
t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), ".")
|
||||
|
|
@ -1243,8 +1244,11 @@ func (t *tester) cgoTest(dt *distTest) error {
|
|||
// -static in CGO_LDFLAGS triggers a different code path
|
||||
// than -static in -extldflags, so test both.
|
||||
// See issue #16651.
|
||||
cmd := t.addCmd(dt, "misc/cgo/test", t.goTest(), "-tags=static", ".")
|
||||
setEnv(cmd, "CGO_LDFLAGS", "-static -pthread")
|
||||
if goarch != "loong64" {
|
||||
// TODO(#56623): Why does this fail on loong64?
|
||||
cmd := t.addCmd(dt, "misc/cgo/test", t.goTest(), "-tags=static", ".")
|
||||
setEnv(cmd, "CGO_LDFLAGS", "-static -pthread")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue