1
0
mirror of https://github.com/golang/go synced 2024-09-25 03:20:13 -06:00

cmd/go: fix including of _cgo_export.h

This will add the temporary object directory into the lookup
path so that cgo-exported function declarations may be
included from C files.

This was previously applied by CL 5600043, and apparently
removed by mistake on CL 5598045.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5610054
This commit is contained in:
Gustavo Niemeyer 2012-02-01 16:07:32 -02:00
parent 4e77e0f294
commit 9fb24b9448

View File

@ -1148,6 +1148,9 @@ func (b *builder) cgo(p *Package, cgoExe, obj string, gccfiles []string) (outGo,
}
}
// Allows including _cgo_export.h from .[ch] files in the package.
cgoCFLAGS = append(cgoCFLAGS, "-I", obj)
// cgo
// TODO: CGOPKGPATH, CGO_FLAGS?
gofiles := []string{obj + "_cgo_gotypes.go"}