Skip to content

Commit 7557e6c

Browse files
markdryangopherbot
authored andcommitted
_content/doc/install/source: mention GORISCV64
Go 1.23 added support for the GORISCV64 environment variable that can be used to instruct the compiler to target a specific RISC-V application profile. By default, GORISCV64 is set to rva20u64 allowing the compiler to target the mandatory extensions in the RVA20U64 profile, essentially rv64gc. By setting GORISCV64 to a later profile, such as rva22u64, the compiler can use additional instructions, such as those provided by Zba, Zbb and Zbs extensions, to reduce code size and improve performance. This is all already documented in "go help environment" but not in the "Installing Go from source" web page. This commit fixes that oversight. Updates golang/go#61476 Change-Id: Ie4aa1804c64b5abf5a3089e1e201d85af65e6119 Reviewed-on: https://go-review.googlesource.com/c/website/+/633615 Auto-Submit: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
1 parent 8b1fe12 commit 7557e6c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

_content/doc/install/source.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,15 @@ <h2 id="environment">Optional environment variables</h2>
763763
</ul>
764764
</li>
765765

766+
<li><code>$GORISCV64</code> (for <code>riscv64</code> only)
767+
<p>
768+
This variable sets the RISC-V user-mode application profile for which to compile. The default is <code>rva20u64</code>.
769+
</p>
770+
<ul>
771+
<li><code>GORISCV64=rva20u64</code>: only use RISC-V extensions that are mandatory in the <a href="https://github.com/riscv/riscv-profiles/blob/main/src/profiles.adoc#51-rva20u64-profile">RVA20U64</a> profile</li>
772+
<li><code>GORISCV64=rva22u64</code>: only use RISC-V extensions that are mandatory in the <a href="https://github.com/riscv/riscv-profiles/blob/main/src/profiles.adoc#rva22u64-profile">RVA22U64</a> profile</li>
773+
</ul>
774+
</li>
766775

767776
<li><code>$GOWASM</code> (for <code>wasm</code> only)
768777
<p>

0 commit comments

Comments
 (0)