]> Cypherpunks repositories - gostls13.git/commit
cmd/go: Add support for including C++ files in packages
authorAlberto GarcĂ­a Hierro <alberto@garciahierro.com>
Fri, 31 May 2013 18:33:36 +0000 (11:33 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 31 May 2013 18:33:36 +0000 (11:33 -0700)
commit84485361f94e2ea9eff9697105d71c9f53e44852
tree680d7b2f5034b94800d98e7cbf88bf9fd96d86bc
parentab5c762a4644c5701dfa14905802979b04cee4b0
cmd/go: Add support for including C++ files in packages

* Add a CXXFiles field to Package, which includes .cc, .cpp and .cxx  files.
* CXXFiles are compiled using g++, which can be overridden using the CXX environment variable.
* Include .hh, .hpp and .hxx files in HFiles.
* Add support for CPPFLAGS (used for both C and C++) and CXXFLAGS (used only for C++) in cgo directive.
* Changed pkg-config cgo directive to modify CPPFLAGS rather than CFLAGS, so both C and C++ files get any flag returned by pkg-config --cflags.

Fixes #1476.

R=iant, r
CC=bradfitz, gobot, golang-dev, iant, minux.ma, remyoudompheng, seb.binet
https://golang.org/cl/8248043
src/cmd/cgo/doc.go
src/cmd/go/build.go
src/cmd/go/doc.go
src/cmd/go/list.go
src/cmd/go/pkg.go
src/cmd/godoc/index.go
src/pkg/go/build/build.go