1
0
mirror of https://github.com/golang/go synced 2024-11-22 03:24:41 -07: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.

R=golang-dev, rogpeppe, rsc
CC=golang-dev
https://golang.org/cl/5600043
This commit is contained in:
Gustavo Niemeyer 2012-01-30 16:04:45 -02:00
parent 74e8a1308a
commit d59c88786d

View File

@ -1146,6 +1146,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 // cgo
// TODO: CGOPKGPATH, CGO_FLAGS? // TODO: CGOPKGPATH, CGO_FLAGS?
gofiles := []string{obj + "_cgo_gotypes.go"} gofiles := []string{obj + "_cgo_gotypes.go"}