mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cgo: interpret $CGOPKGDIR as absolute path if rooted
R=dho CC=golang-dev https://golang.org/cl/180099
This commit is contained in:
parent
fa98cf6eef
commit
c276d87c6c
3 changed files with 16 additions and 5 deletions
|
|
@ -126,8 +126,11 @@ func main() {
|
|||
if nerrors > 0 {
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
p.PackagePath = os.Getenv("CGOPKGPATH") + "/" + p.Package
|
||||
pkg := p.Package
|
||||
if dir := os.Getenv("CGOPKGPATH"); dir != "" {
|
||||
pkg = dir + "/" + pkg
|
||||
}
|
||||
p.PackagePath = pkg
|
||||
p.writeOutput(input)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue