mirror of
https://github.com/golang/go
synced 2024-11-25 10:07:56 -07:00
cmd/go: avoid repeated include dirs.
Fixes #3171. R=golang-dev, rsc CC=golang-dev, remy https://golang.org/cl/5724045
This commit is contained in:
parent
4d7d3f5328
commit
1feecdd633
@ -790,12 +790,12 @@ func (b *builder) includeArgs(flag string, all []*action) []string {
|
|||||||
// Finally, look in the installed package directories for each action.
|
// Finally, look in the installed package directories for each action.
|
||||||
for _, a1 := range all {
|
for _, a1 := range all {
|
||||||
if dir := a1.pkgdir; dir == a1.p.build.PkgRoot && !incMap[dir] {
|
if dir := a1.pkgdir; dir == a1.p.build.PkgRoot && !incMap[dir] {
|
||||||
|
incMap[dir] = true
|
||||||
if _, ok := buildToolchain.(gccgoToolchain); ok {
|
if _, ok := buildToolchain.(gccgoToolchain); ok {
|
||||||
dir = filepath.Join(dir, "gccgo")
|
dir = filepath.Join(dir, "gccgo")
|
||||||
} else {
|
} else {
|
||||||
dir = filepath.Join(dir, goos+"_"+goarch)
|
dir = filepath.Join(dir, goos+"_"+goarch)
|
||||||
}
|
}
|
||||||
incMap[dir] = true
|
|
||||||
inc = append(inc, flag, dir)
|
inc = append(inc, flag, dir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user