1
0
mirror of https://github.com/golang/go synced 2024-11-17 00:24:48 -07:00

cmd/go: remove unused var BuildToolchainLinker and BuildToolchainCompiler

Change-Id: I4bb855f6ada5c550a46f69313a2f47631bf657ca
GitHub-Last-Rev: 2af07f9d7b
GitHub-Pull-Request: golang/go#65838
Reviewed-on: https://go-review.googlesource.com/c/go/+/565517
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
qiulaidongfeng 2024-02-21 09:29:17 +00:00 committed by Gopher Robot
parent 6c979d2522
commit cd17032721
2 changed files with 25 additions and 31 deletions

View File

@ -64,33 +64,31 @@ func ToolExeSuffix() string {
// These are general "build flags" used by build and other commands.
var (
BuildA bool // -a flag
BuildBuildmode string // -buildmode flag
BuildBuildvcs = "auto" // -buildvcs flag: "true", "false", or "auto"
BuildContext = defaultContext()
BuildMod string // -mod flag
BuildModExplicit bool // whether -mod was set explicitly
BuildModReason string // reason -mod was set, if set by default
BuildLinkshared bool // -linkshared flag
BuildMSan bool // -msan flag
BuildASan bool // -asan flag
BuildCover bool // -cover flag
BuildCoverMode string // -covermode flag
BuildCoverPkg []string // -coverpkg flag
BuildN bool // -n flag
BuildO string // -o flag
BuildP = runtime.GOMAXPROCS(0) // -p flag
BuildPGO string // -pgo flag
BuildPkgdir string // -pkgdir flag
BuildRace bool // -race flag
BuildToolexec []string // -toolexec flag
BuildToolchainName string
BuildToolchainCompiler func() string
BuildToolchainLinker func() string
BuildTrimpath bool // -trimpath flag
BuildV bool // -v flag
BuildWork bool // -work flag
BuildX bool // -x flag
BuildA bool // -a flag
BuildBuildmode string // -buildmode flag
BuildBuildvcs = "auto" // -buildvcs flag: "true", "false", or "auto"
BuildContext = defaultContext()
BuildMod string // -mod flag
BuildModExplicit bool // whether -mod was set explicitly
BuildModReason string // reason -mod was set, if set by default
BuildLinkshared bool // -linkshared flag
BuildMSan bool // -msan flag
BuildASan bool // -asan flag
BuildCover bool // -cover flag
BuildCoverMode string // -covermode flag
BuildCoverPkg []string // -coverpkg flag
BuildN bool // -n flag
BuildO string // -o flag
BuildP = runtime.GOMAXPROCS(0) // -p flag
BuildPGO string // -pgo flag
BuildPkgdir string // -pkgdir flag
BuildRace bool // -race flag
BuildToolexec []string // -toolexec flag
BuildToolchainName string
BuildTrimpath bool // -trimpath flag
BuildV bool // -v flag
BuildWork bool // -work flag
BuildX bool // -x flag
ModCacheRW bool // -modcacherw flag
ModFile string // -modfile flag
@ -181,8 +179,6 @@ func defaultContext() build.Context {
func init() {
SetGOROOT(Getenv("GOROOT"), false)
BuildToolchainCompiler = func() string { return "missing-compiler" }
BuildToolchainLinker = func() string { return "missing-linker" }
}
// SetGOROOT sets GOROOT and associated variables to the given values.

View File

@ -276,8 +276,6 @@ func (c buildCompiler) Set(value string) error {
return fmt.Errorf("unknown compiler %q", value)
}
cfg.BuildToolchainName = value
cfg.BuildToolchainCompiler = BuildToolchain.compiler
cfg.BuildToolchainLinker = BuildToolchain.linker
cfg.BuildContext.Compiler = value
return nil
}