Skip to content

Commit

Permalink
doc: improve documentation for GOAMD64
Browse files Browse the repository at this point in the history
The change clarifies in the release notes for go1.18 that the variable
is for compilation and references the microarchitecture description in
the Go Wiki,
https://golang.org/wiki/MinimumRequirements#amd64,
and references the same information in the output of go help
environment.

Fixes #50174

Change-Id: I6a7d5a06f48463a810c96cc9c76fe66113d5147c
Reviewed-on: https://go-review.googlesource.com/c/go/+/372194
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
  • Loading branch information
ulikunitz authored and randall77 committed Jan 6, 2022
1 parent 2b39d86 commit b5bfaf4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions doc/go1.18.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,12 @@ <h2 id="ports">Ports</h2>
<h3 id="amd64">AMD64</h3>

<p><!-- CL 349595 -->
Go 1.18 introduces the new <code>GOAMD64</code> environment variable which selects
a version of the AMD64 architecture. Allowed values are <code>v1</code>,
Go 1.18 introduces the new <code>GOAMD64</code> environment variable, which selects
a mininum target version of the AMD64 architecture. Allowed values are <code>v1</code>,
<code>v2</code>, <code>v3</code>, or <code>v4</code>. Each higher level requires,
and takes advantage of, additional processor features. A detailed description of the
versions is <a href="https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels">here</a>.
and takes advantage of, additional processor features. A detailed
description can be found
<a href="https://golang.org/wiki/MinimumRequirements#amd64">here</a>.
</p>
<p>
The <code>GOAMD64</code> environment variable defaults to <code>v1</code>.
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/alldocs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/cmd/go/internal/help/helpdoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ Architecture-specific environment variables:
GOAMD64
For GOARCH=amd64, the microarchitecture level for which to compile.
Valid values are v1 (default), v2, v3, v4.
See https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels.
See https://golang.org/wiki/MinimumRequirements#amd64
GOMIPS
For GOARCH=mips{,le}, whether to use floating point instructions.
Valid values are hardfloat (default), softfloat.
Expand Down

0 comments on commit b5bfaf4

Please sign in to comment.