]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: permit $AR to include options
authorIan Lance Taylor <iant@golang.org>
Wed, 6 Sep 2023 18:18:07 +0000 (11:18 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 6 Sep 2023 18:35:28 +0000 (18:35 +0000)
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>
src/cmd/go/internal/work/gccgo.go

index dcc779ee97ec9baea6e426c5c8d25845993cc964..edf136df9297a166963fff6403d5df2ec9dff4ef 100644 (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() {