Commit 60ae0fdd11 for golang
commit 60ae0fdd111e9458ac192d336c78b4a094214aaf
Author: Anand T <anandprince100@gmail.com>
Date: Fri Nov 27 18:26:14 2026 +0000
cmd/go: point CC and CXX help to their current settings
Point the CC and CXX environment-variable help to 'go env CC' and
'go env CXX' so users can inspect the compiler commands in effect.
Updates #37886
Change-Id: Id24ecb16eb21c1319de29adfd973ad4999fa00f0
GitHub-Last-Rev: f199f3421dbd3b27115050e48a506382679c9b08
GitHub-Pull-Request: golang/go#83272
Reviewed-on: https://go-review.googlesource.com/c/go/+/865964
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Sean Liao <sean@liao.dev>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index 9c84d08e9c..893cbad7b8 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -2530,6 +2530,7 @@
// The default is 'ar'.
// CC
// The command to use to compile C code.
+// See 'go env CC' for the current setting.
// CGO_CFLAGS
// Flags that cgo will pass to the compiler when compiling
// C code.
@@ -2557,6 +2558,7 @@
// but for the linker.
// CXX
// The command to use to compile C++ code.
+// See 'go env CXX' for the current setting.
// FC
// The command to use to compile Fortran code.
// PKG_CONFIG
diff --git a/src/cmd/go/internal/help/helpdoc.go b/src/cmd/go/internal/help/helpdoc.go
index 0c7e3ba28f..fa2da9425d 100644
--- a/src/cmd/go/internal/help/helpdoc.go
+++ b/src/cmd/go/internal/help/helpdoc.go
@@ -652,6 +652,7 @@ Environment variables for use with cgo:
The default is 'ar'.
CC
The command to use to compile C code.
+ See 'go env CC' for the current setting.
CGO_CFLAGS
Flags that cgo will pass to the compiler when compiling
C code.
@@ -679,6 +680,7 @@ Environment variables for use with cgo:
but for the linker.
CXX
The command to use to compile C++ code.
+ See 'go env CXX' for the current setting.
FC
The command to use to compile Fortran code.
PKG_CONFIG