mirror of
https://github.com/golang/go
synced 2024-11-19 06:04:39 -07:00
cmd/dist, go/types: add support for GOARCH=riscv64
This is needed in addition to CL 110066 in order to be able to generate Go type definitions for linux/riscv64 in the golang.org/x/sys/unix package. Change-Id: I4a27e6424aaea63283b55bd4f73b958b41f29d72 Reviewed-on: https://go-review.googlesource.com/118618 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
ee2e8ecb19
commit
16caec5892
2
src/cmd/dist/build.go
vendored
2
src/cmd/dist/build.go
vendored
@ -67,6 +67,7 @@ var okgoarch = []string{
|
||||
"mips64le",
|
||||
"ppc64",
|
||||
"ppc64le",
|
||||
"riscv64",
|
||||
"s390x",
|
||||
"wasm",
|
||||
}
|
||||
@ -1393,6 +1394,7 @@ var cgoEnabled = map[string]bool{
|
||||
"linux/mipsle": true,
|
||||
"linux/mips64": true,
|
||||
"linux/mips64le": true,
|
||||
"linux/riscv64": true,
|
||||
"linux/s390x": true,
|
||||
"android/386": true,
|
||||
"android/amd64": true,
|
||||
|
@ -197,6 +197,11 @@ func (p platform) vet() {
|
||||
fmt.Println("skipping js/wasm")
|
||||
return
|
||||
}
|
||||
if p.os == "linux" && p.arch == "riscv64" {
|
||||
// TODO(tklauser): enable as soon as the riscv64 port has fully landed
|
||||
fmt.Println("skipping linux/riscv64")
|
||||
return
|
||||
}
|
||||
|
||||
var buf bytes.Buffer
|
||||
fmt.Fprintf(&buf, "go run main.go -p %s\n", p)
|
||||
|
@ -167,6 +167,7 @@ var gcArchSizes = map[string]*StdSizes{
|
||||
"mips64le": {8, 8},
|
||||
"ppc64": {8, 8},
|
||||
"ppc64le": {8, 8},
|
||||
"riscv64": {8, 8},
|
||||
"s390x": {8, 8},
|
||||
"wasm": {8, 8},
|
||||
// When adding more architectures here,
|
||||
@ -178,7 +179,7 @@ var gcArchSizes = map[string]*StdSizes{
|
||||
//
|
||||
// Supported architectures for compiler "gc":
|
||||
// "386", "arm", "arm64", "amd64", "amd64p32", "mips", "mipsle",
|
||||
// "mips64", "mips64le", "ppc64", "ppc64le", "s390x", "wasm".
|
||||
// "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm".
|
||||
func SizesFor(compiler, arch string) Sizes {
|
||||
if compiler != "gc" {
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user