mirror of
https://github.com/golang/go
synced 2024-11-17 00:14:50 -07:00
cmd/go: remove unused var BuildToolchainLinker and BuildToolchainCompiler
Change-Id: I68fef77c455fb3debbc39a31047b232fa5b91f68
This commit is contained in:
parent
d42cd452dc
commit
2af07f9d7b
@ -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.
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user