Commit 1feecdd6 authored by Rémy Oudompheng's avatar Rémy Oudompheng Committed by Russ Cox

cmd/go: avoid repeated include dirs.

Fixes #3171.

R=golang-dev, rsc
CC=golang-dev, remy
https://golang.org/cl/5724045
parent 4d7d3f53
......@@ -790,12 +790,12 @@ func (b *builder) includeArgs(flag string, all []*action) []string {
// Finally, look in the installed package directories for each action.
for _, a1 := range all {
if dir := a1.pkgdir; dir == a1.p.build.PkgRoot && !incMap[dir] {
incMap[dir] = true
if _, ok := buildToolchain.(gccgoToolchain); ok {
dir = filepath.Join(dir, "gccgo")
} else {
dir = filepath.Join(dir, goos+"_"+goarch)
}
incMap[dir] = true
inc = append(inc, flag, dir)
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment