From: Julian Zhu Date: Tue, 15 Apr 2025 13:34:42 +0000 (+0800) Subject: internal/buildcfg: add ability to get GORISCV64 variable in GOGOARCH X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ada30b8248e535b6bc7939b339803bb87412e861;p=gostls13.git 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 --- 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() }