• Alberto García Hierro's avatar
    cmd/go: Add support for including C++ files in packages · 84485361
    Alberto García Hierro authored
    * 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
    84485361
doc.go 23.6 KB