Commit d59c8878 authored by Gustavo Niemeyer's avatar Gustavo Niemeyer

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