commit | 53cdfab53ce79d8dfc1df01a696d4ffc43f17c3d | [log] [tgz] |
---|---|---|
author | Ian Lance Taylor <iant@golang.org> | Wed Sep 06 11:21:11 2023 -0700 |
committer | Ian Lance Taylor <iant@golang.org> | Wed Sep 06 18:37:09 2023 +0000 |
tree | 1aedd7e62b916eac28453ee300ba333d1cc401c7 | |
parent | d04b024021bb7dbaa434a6d902bd12beb08e315f [diff] |
cmd/go: permit $AR to include options Handle the AR environment variable, used by gccgo, the same way we handle the CC environment variable. This ports https://go.dev/cl/526275 to the gofrontend repo. This is needed for gccgo testing because the top-level GCC Makefile now passes a --plugin option to ar if it supports one. Change-Id: I54cd6b6d5b1a757ea112c159414b2f24fa0fb25a Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/526295 Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
diff --git a/libgo/go/cmd/go/internal/work/gccgo.go b/libgo/go/cmd/go/internal/work/gccgo.go index c1026c7..3e07f87 100644 --- a/libgo/go/cmd/go/internal/work/gccgo.go +++ b/libgo/go/cmd/go/internal/work/gccgo.go
@@ -45,12 +45,8 @@ 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() {