cmd/go: permit $AR to include options

Handle the AR environment variable, used by gccgo,
the same way we handle the CC environment variable.

Change-Id: I4f42161469392f68f0b5adeb9c8b52359d5108a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/526275
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
This commit is contained in:
Ian Lance Taylor 2023-09-06 11:18:07 -07:00 committed by Gopher Robot
parent 3f0f76734e
commit f25ca8b33d

View File

@ -45,12 +45,8 @@ func (gccgoToolchain) linker() string {
return GccgoBin
}
func (gccgoToolchain) ar() string {
ar := cfg.Getenv("AR")
if ar == "" {
ar = "ar"
}
return ar
func (gccgoToolchain) ar() []string {
return envList("AR", "ar")
}
func checkGccgoBin() {