mirror of
https://github.com/golang/go
synced 2024-11-21 21:54:40 -07:00
cmd/go: fix handling of gccgo standard library.
The previous logic was mainly non-working. It only needs to ensure that the go tool doesn't try to build the standard library with gccgo. R=golang-dev, rsc CC=golang-dev, remy https://golang.org/cl/5580051
This commit is contained in:
parent
3c6bebf5a7
commit
d7172084d0
@ -349,6 +349,12 @@ func (b *builder) action(mode buildMode, depMode buildMode, p *Package) *action
|
||||
// Fake packages - nothing to build.
|
||||
return a
|
||||
}
|
||||
// gccgo standard library is "fake" too.
|
||||
if _, ok := buildToolchain.(gccgoToolchain); ok {
|
||||
// the target name is needed for cgo.
|
||||
a.target = p.target
|
||||
return a
|
||||
}
|
||||
}
|
||||
|
||||
if !p.Stale && !buildA && p.target != "" {
|
||||
|
@ -295,14 +295,6 @@ func scanPackage(ctxt *build.Context, t *build.Tree, arg, importPath, dir string
|
||||
dir = filepath.Join(filepath.Dir(dir), "gccgo", filepath.Base(dir))
|
||||
}
|
||||
p.target = buildToolchain.pkgpath(dir, p)
|
||||
|
||||
// NB. Currently we have gccgo install the standard libraries
|
||||
// in the "usual" location, where the Go toolchain puts them.
|
||||
if p.Standard {
|
||||
if _, ok := buildToolchain.(gccgoToolchain); ok {
|
||||
p.target = goToolchain{}.pkgpath(dir, p)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var built time.Time
|
||||
|
Loading…
Reference in New Issue
Block a user