Commit 16caec58 authored by Tobias Klauser's avatar Tobias Klauser Committed by Tobias Klauser

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: 's avatarIan Lance Taylor <iant@golang.org>
parent ee2e8ecb
...@@ -67,6 +67,7 @@ var okgoarch = []string{ ...@@ -67,6 +67,7 @@ var okgoarch = []string{
"mips64le", "mips64le",
"ppc64", "ppc64",
"ppc64le", "ppc64le",
"riscv64",
"s390x", "s390x",
"wasm", "wasm",
} }
...@@ -1393,6 +1394,7 @@ var cgoEnabled = map[string]bool{ ...@@ -1393,6 +1394,7 @@ var cgoEnabled = map[string]bool{
"linux/mipsle": true, "linux/mipsle": true,
"linux/mips64": true, "linux/mips64": true,
"linux/mips64le": true, "linux/mips64le": true,
"linux/riscv64": true,
"linux/s390x": true, "linux/s390x": true,
"android/386": true, "android/386": true,
"android/amd64": true, "android/amd64": true,
......
...@@ -197,6 +197,11 @@ func (p platform) vet() { ...@@ -197,6 +197,11 @@ func (p platform) vet() {
fmt.Println("skipping js/wasm") fmt.Println("skipping js/wasm")
return 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 var buf bytes.Buffer
fmt.Fprintf(&buf, "go run main.go -p %s\n", p) fmt.Fprintf(&buf, "go run main.go -p %s\n", p)
......
...@@ -167,6 +167,7 @@ var gcArchSizes = map[string]*StdSizes{ ...@@ -167,6 +167,7 @@ var gcArchSizes = map[string]*StdSizes{
"mips64le": {8, 8}, "mips64le": {8, 8},
"ppc64": {8, 8}, "ppc64": {8, 8},
"ppc64le": {8, 8}, "ppc64le": {8, 8},
"riscv64": {8, 8},
"s390x": {8, 8}, "s390x": {8, 8},
"wasm": {8, 8}, "wasm": {8, 8},
// When adding more architectures here, // When adding more architectures here,
...@@ -178,7 +179,7 @@ var gcArchSizes = map[string]*StdSizes{ ...@@ -178,7 +179,7 @@ var gcArchSizes = map[string]*StdSizes{
// //
// Supported architectures for compiler "gc": // Supported architectures for compiler "gc":
// "386", "arm", "arm64", "amd64", "amd64p32", "mips", "mipsle", // "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 { func SizesFor(compiler, arch string) Sizes {
if compiler != "gc" { if compiler != "gc" {
return nil return nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment