Skip to content

Commit 31cc614

Browse files
rscpull[bot]
authored andcommitted
cmd/go: add GOFIPS140 to 'go help environment'
Also re-sort the various lists. (All lists should be sorted.) The linked page https://go.dev/security/fips140 has yet to be written, but soon. For #70123. Change-Id: Ica5bbf5bd29e9136c2a49d3099d6e0e018c36145 Reviewed-on: https://go-review.googlesource.com/c/go/+/629816 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Russ Cox <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 606048e commit 31cc614

File tree

2 files changed

+50
-38
lines changed

2 files changed

+50
-38
lines changed

src/cmd/go/alldocs.go

Lines changed: 25 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmd/go/internal/help/helpdoc.go

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -491,12 +491,12 @@ See 'go help env' for details.
491491
492492
General-purpose environment variables:
493493
494+
GCCGO
495+
The gccgo command to run for 'go build -compiler=gccgo'.
494496
GO111MODULE
495497
Controls whether the go command runs in module-aware mode or GOPATH mode.
496498
May be "off", "on", or "auto".
497499
See https://golang.org/ref/mod#mod-commands.
498-
GCCGO
499-
The gccgo command to run for 'go build -compiler=gccgo'.
500500
GOARCH
501501
The architecture, or processor, for which to compile code.
502502
Examples are amd64, 386, arm, ppc64.
@@ -508,8 +508,6 @@ General-purpose environment variables:
508508
GOCACHE
509509
The directory where the go command will store cached
510510
information for reuse in future builds.
511-
GOMODCACHE
512-
The directory where the go command will store downloaded modules.
513511
GODEBUG
514512
Enable various debugging facilities. See https://go.dev/doc/godebug
515513
for details.
@@ -531,29 +529,31 @@ General-purpose environment variables:
531529
manner. Only applies to dependencies that are being fetched directly.
532530
GOINSECURE does not disable checksum database validation. GOPRIVATE or
533531
GONOSUMDB may be used to achieve that.
532+
GOMODCACHE
533+
The directory where the go command will store downloaded modules.
534534
GOOS
535535
The operating system for which to compile code.
536536
Examples are linux, darwin, windows, netbsd.
537537
GOPATH
538538
Controls where various files are stored. See: 'go help gopath'.
539-
GOPROXY
540-
URL of Go module proxy. See https://golang.org/ref/mod#environment-variables
541-
and https://golang.org/ref/mod#module-proxy for details.
542539
GOPRIVATE, GONOPROXY, GONOSUMDB
543540
Comma-separated list of glob patterns (in the syntax of Go's path.Match)
544541
of module path prefixes that should always be fetched directly
545542
or that should not be compared against the checksum database.
546543
See https://golang.org/ref/mod#private-modules.
544+
GOPROXY
545+
URL of Go module proxy. See https://golang.org/ref/mod#environment-variables
546+
and https://golang.org/ref/mod#module-proxy for details.
547547
GOROOT
548548
The root of the go tree.
549549
GOSUMDB
550550
The name of checksum database to use and optionally its public key and
551551
URL. See https://golang.org/ref/mod#authenticating.
552-
GOTOOLCHAIN
553-
Controls which Go toolchain is used. See https://go.dev/doc/toolchain.
554552
GOTMPDIR
555553
The directory where the go command will write
556554
temporary source files, packages, and binaries.
555+
GOTOOLCHAIN
556+
Controls which Go toolchain is used. See https://go.dev/doc/toolchain.
557557
GOVCS
558558
Lists version control commands that may be used with matching servers.
559559
See 'go help vcs'.
@@ -574,8 +574,6 @@ Environment variables for use with cgo:
574574
The default is 'ar'.
575575
CC
576576
The command to use to compile C code.
577-
CGO_ENABLED
578-
Whether the cgo command is supported. Either 0 or 1.
579577
CGO_CFLAGS
580578
Flags that cgo will pass to the compiler when compiling
581579
C code.
@@ -593,6 +591,8 @@ Environment variables for use with cgo:
593591
CGO_CXXFLAGS, CGO_CXXFLAGS_ALLOW, CGO_CXXFLAGS_DISALLOW
594592
Like CGO_CFLAGS, CGO_CFLAGS_ALLOW, and CGO_CFLAGS_DISALLOW,
595593
but for the C++ compiler.
594+
CGO_ENABLED
595+
Whether the cgo command is supported. Either 0 or 1.
596596
CGO_FFLAGS, CGO_FFLAGS_ALLOW, CGO_FFLAGS_DISALLOW
597597
Like CGO_CFLAGS, CGO_CFLAGS_ALLOW, and CGO_CFLAGS_DISALLOW,
598598
but for the Fortran compiler.
@@ -608,6 +608,13 @@ Environment variables for use with cgo:
608608
609609
Architecture-specific environment variables:
610610
611+
GO386
612+
For GOARCH=386, how to implement floating point instructions.
613+
Valid values are sse2 (default), softfloat.
614+
GOAMD64
615+
For GOARCH=amd64, the microarchitecture level for which to compile.
616+
Valid values are v1 (default), v2, v3, v4.
617+
See https://golang.org/wiki/MinimumRequirements#amd64
611618
GOARM
612619
For GOARCH=arm, the ARM architecture for which to compile.
613620
Valid values are 5, 6, 7.
@@ -620,13 +627,6 @@ Architecture-specific environment variables:
620627
Valid options are ,lse and ,crypto.
621628
Note that some extensions are enabled by default starting from a certain GOARM64 version;
622629
for example, lse is enabled by default starting from v8.1.
623-
GO386
624-
For GOARCH=386, how to implement floating point instructions.
625-
Valid values are sse2 (default), softfloat.
626-
GOAMD64
627-
For GOARCH=amd64, the microarchitecture level for which to compile.
628-
Valid values are v1 (default), v2, v3, v4.
629-
See https://golang.org/wiki/MinimumRequirements#amd64
630630
GOMIPS
631631
For GOARCH=mips{,le}, whether to use floating point instructions.
632632
Valid values are hardfloat (default), softfloat.
@@ -659,9 +659,15 @@ Special-purpose environment variables:
659659
GOEXPERIMENT
660660
Comma-separated list of toolchain experiments to enable or disable.
661661
The list of available experiments may change arbitrarily over time.
662-
See src/internal/goexperiment/flags.go for currently valid values.
662+
See GOROOT/src/internal/goexperiment/flags.go for currently valid values.
663663
Warning: This variable is provided for the development and testing
664664
of the Go toolchain itself. Use beyond that purpose is unsupported.
665+
GOFIPS140
666+
The FIPS-140 cryptography mode to use when building binaries.
667+
The default is GOFIPS140=off, which makes no FIPS-140 changes at all.
668+
Other values enable FIPS-140 compliance measures and select alternate
669+
versions of the cryptography source code.
670+
See https://go.dev/security/fips140 for details.
665671
GO_EXTLINK_ENABLED
666672
Whether the linker should use external linking mode
667673
when using -linkmode=auto with code that uses cgo.

0 commit comments

Comments
 (0)