]> Cypherpunks repositories - gostls13.git/commitdiff
internal/buildcfg: add ability to get GORISCV64 variable in GOGOARCH
authorJulian Zhu <julian.oerv@isrc.iscas.ac.cn>
Tue, 15 Apr 2025 13:34:42 +0000 (21:34 +0800)
committerMeng Zhuo <mengzhuo1203@gmail.com>
Fri, 25 Jul 2025 00:49:15 +0000 (17:49 -0700)
For #61476

Change-Id: I29f4c1c3c3303e70ec2d7f380112eb2d00754018
Reviewed-on: https://go-review.googlesource.com/c/go/+/665655
Reviewed-by: Mark Ryan <markdryan@rivosinc.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <mark@golang.org>
Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com>
src/internal/buildcfg/cfg.go

index 5ae4c0c7adc8fec633692cf20dd3254297fb55b4..7e4ee365dfe126376807fafd63c97c1abeee4ba3 100644 (file)
@@ -392,6 +392,8 @@ func GOGOARCH() (name, value string) {
                return "GOMIPS64", GOMIPS64
        case "ppc64", "ppc64le":
                return "GOPPC64", fmt.Sprintf("power%d", GOPPC64)
+       case "riscv64":
+               return "GORISCV64", fmt.Sprintf("rva%du64", GORISCV64)
        case "wasm":
                return "GOWASM", GOWASM.String()
        }