From b5bfaf410ad4dc329400b92a7818ffec5cd9ebb0 Mon Sep 17 00:00:00 2001 From: Ulrich Kunitz Date: Wed, 15 Dec 2021 11:37:36 +0100 Subject: [PATCH] doc: improve documentation for GOAMD64 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 Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gopher Robot --- doc/go1.18.html | 9 +++++---- src/cmd/go/alldocs.go | 2 +- src/cmd/go/internal/help/helpdoc.go | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/go1.18.html b/doc/go1.18.html index a5d7dcfcc51f31..0f313ee4543248 100644 --- a/doc/go1.18.html +++ b/doc/go1.18.html @@ -143,11 +143,12 @@

Ports

AMD64

- Go 1.18 introduces the new GOAMD64 environment variable which selects - a version of the AMD64 architecture. Allowed values are v1, + Go 1.18 introduces the new GOAMD64 environment variable, which selects + a mininum target version of the AMD64 architecture. Allowed values are v1, v2, v3, or v4. Each higher level requires, - and takes advantage of, additional processor features. A detailed description of the - versions is here. + and takes advantage of, additional processor features. A detailed + description can be found + here.

The GOAMD64 environment variable defaults to v1. diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index d90321414a72ea..3bb9d146b21ae4 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -2131,7 +2131,7 @@ // 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. diff --git a/src/cmd/go/internal/help/helpdoc.go b/src/cmd/go/internal/help/helpdoc.go index 035235fe1b5a1d..7dc066cfbad6cc 100644 --- a/src/cmd/go/internal/help/helpdoc.go +++ b/src/cmd/go/internal/help/helpdoc.go @@ -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.