From ada30b8248e535b6bc7939b339803bb87412e861 Mon Sep 17 00:00:00 2001 From: Julian Zhu Date: Tue, 15 Apr 2025 21:34:42 +0800 Subject: [PATCH] internal/buildcfg: add ability to get GORISCV64 variable in GOGOARCH For #61476 Change-Id: I29f4c1c3c3303e70ec2d7f380112eb2d00754018 Reviewed-on: https://go-review.googlesource.com/c/go/+/665655 Reviewed-by: Mark Ryan Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI Reviewed-by: Mark Freeman Reviewed-by: Meng Zhuo --- src/internal/buildcfg/cfg.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/internal/buildcfg/cfg.go b/src/internal/buildcfg/cfg.go index 5ae4c0c7ad..7e4ee365df 100644 --- a/src/internal/buildcfg/cfg.go +++ b/src/internal/buildcfg/cfg.go @@ -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() } -- 2.51.0