mirror of
https://github.com/golang/go
synced 2024-11-27 01:01:21 -07:00
cmd/go: don't pass empty string to ar when using -compiler=gccgo
Correct error introduced in CL 145417 on non-AIX systems. Fixes #28511 Change-Id: I6624939061425af19faccedd271f465d1fe6b975 Reviewed-on: https://go-review.googlesource.com/c/146277 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
3553eca27c
commit
d086c5c81f
@ -186,12 +186,12 @@ func (gccgoToolchain) pack(b *Builder, a *Action, afile string, ofiles []string)
|
|||||||
for _, f := range ofiles {
|
for _, f := range ofiles {
|
||||||
absOfiles = append(absOfiles, mkAbs(objdir, f))
|
absOfiles = append(absOfiles, mkAbs(objdir, f))
|
||||||
}
|
}
|
||||||
var arArgs string
|
var arArgs []string
|
||||||
if cfg.Goos == "aix" && cfg.Goarch == "ppc64" {
|
if cfg.Goos == "aix" && cfg.Goarch == "ppc64" {
|
||||||
// AIX puts both 32-bit and 64-bit objects in the same archive.
|
// AIX puts both 32-bit and 64-bit objects in the same archive.
|
||||||
// Tell the AIX "ar" command to only care about 64-bit objects.
|
// Tell the AIX "ar" command to only care about 64-bit objects.
|
||||||
// AIX "ar" command does not know D option.
|
// AIX "ar" command does not know D option.
|
||||||
arArgs = "-X64"
|
arArgs = []string{"-X64"}
|
||||||
}
|
}
|
||||||
|
|
||||||
return b.run(a, p.Dir, p.ImportPath, nil, "ar", arArgs, "rc", mkAbs(objdir, afile), absOfiles)
|
return b.run(a, p.Dir, p.ImportPath, nil, "ar", arArgs, "rc", mkAbs(objdir, afile), absOfiles)
|
||||||
|
Loading…
Reference in New Issue
Block a user