@@ -491,12 +491,12 @@ See 'go help env' for details.
491
491
492
492
General-purpose environment variables:
493
493
494
+ GCCGO
495
+ The gccgo command to run for 'go build -compiler=gccgo'.
494
496
GO111MODULE
495
497
Controls whether the go command runs in module-aware mode or GOPATH mode.
496
498
May be "off", "on", or "auto".
497
499
See https://golang.org/ref/mod#mod-commands.
498
- GCCGO
499
- The gccgo command to run for 'go build -compiler=gccgo'.
500
500
GOARCH
501
501
The architecture, or processor, for which to compile code.
502
502
Examples are amd64, 386, arm, ppc64.
@@ -508,8 +508,6 @@ General-purpose environment variables:
508
508
GOCACHE
509
509
The directory where the go command will store cached
510
510
information for reuse in future builds.
511
- GOMODCACHE
512
- The directory where the go command will store downloaded modules.
513
511
GODEBUG
514
512
Enable various debugging facilities. See https://go.dev/doc/godebug
515
513
for details.
@@ -531,29 +529,31 @@ General-purpose environment variables:
531
529
manner. Only applies to dependencies that are being fetched directly.
532
530
GOINSECURE does not disable checksum database validation. GOPRIVATE or
533
531
GONOSUMDB may be used to achieve that.
532
+ GOMODCACHE
533
+ The directory where the go command will store downloaded modules.
534
534
GOOS
535
535
The operating system for which to compile code.
536
536
Examples are linux, darwin, windows, netbsd.
537
537
GOPATH
538
538
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.
542
539
GOPRIVATE, GONOPROXY, GONOSUMDB
543
540
Comma-separated list of glob patterns (in the syntax of Go's path.Match)
544
541
of module path prefixes that should always be fetched directly
545
542
or that should not be compared against the checksum database.
546
543
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.
547
547
GOROOT
548
548
The root of the go tree.
549
549
GOSUMDB
550
550
The name of checksum database to use and optionally its public key and
551
551
URL. See https://golang.org/ref/mod#authenticating.
552
- GOTOOLCHAIN
553
- Controls which Go toolchain is used. See https://go.dev/doc/toolchain.
554
552
GOTMPDIR
555
553
The directory where the go command will write
556
554
temporary source files, packages, and binaries.
555
+ GOTOOLCHAIN
556
+ Controls which Go toolchain is used. See https://go.dev/doc/toolchain.
557
557
GOVCS
558
558
Lists version control commands that may be used with matching servers.
559
559
See 'go help vcs'.
@@ -574,8 +574,6 @@ Environment variables for use with cgo:
574
574
The default is 'ar'.
575
575
CC
576
576
The command to use to compile C code.
577
- CGO_ENABLED
578
- Whether the cgo command is supported. Either 0 or 1.
579
577
CGO_CFLAGS
580
578
Flags that cgo will pass to the compiler when compiling
581
579
C code.
@@ -593,6 +591,8 @@ Environment variables for use with cgo:
593
591
CGO_CXXFLAGS, CGO_CXXFLAGS_ALLOW, CGO_CXXFLAGS_DISALLOW
594
592
Like CGO_CFLAGS, CGO_CFLAGS_ALLOW, and CGO_CFLAGS_DISALLOW,
595
593
but for the C++ compiler.
594
+ CGO_ENABLED
595
+ Whether the cgo command is supported. Either 0 or 1.
596
596
CGO_FFLAGS, CGO_FFLAGS_ALLOW, CGO_FFLAGS_DISALLOW
597
597
Like CGO_CFLAGS, CGO_CFLAGS_ALLOW, and CGO_CFLAGS_DISALLOW,
598
598
but for the Fortran compiler.
@@ -608,6 +608,13 @@ Environment variables for use with cgo:
608
608
609
609
Architecture-specific environment variables:
610
610
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
611
618
GOARM
612
619
For GOARCH=arm, the ARM architecture for which to compile.
613
620
Valid values are 5, 6, 7.
@@ -620,13 +627,6 @@ Architecture-specific environment variables:
620
627
Valid options are ,lse and ,crypto.
621
628
Note that some extensions are enabled by default starting from a certain GOARM64 version;
622
629
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
630
630
GOMIPS
631
631
For GOARCH=mips{,le}, whether to use floating point instructions.
632
632
Valid values are hardfloat (default), softfloat.
@@ -659,9 +659,15 @@ Special-purpose environment variables:
659
659
GOEXPERIMENT
660
660
Comma-separated list of toolchain experiments to enable or disable.
661
661
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.
663
663
Warning: This variable is provided for the development and testing
664
664
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.
665
671
GO_EXTLINK_ENABLED
666
672
Whether the linker should use external linking mode
667
673
when using -linkmode=auto with code that uses cgo.
0 commit comments