• Elias Naur's avatar
    cmd/go, cmd/cgo, make.bash: cross compiling with cgo enabled · 2dc759d7
    Elias Naur authored
    Introduce two new environment variables, CC_FOR_TARGET and CXX_FOR_TARGET.
    CC_FOR_TARGET defaults to CC and is used when compiling for GOARCH, while
    CC remains for compiling for GOHOSTARCH.
    CXX_FOR_TARGET defaults to CXX and is used when compiling C++ code for
    GOARCH.
    
    CGO_ENABLED defaults to disabled when cross compiling and has to be
    explicitly enabled.
    
    Update #4714
    
    LGTM=minux.ma, iant
    R=golang-codereviews, minux.ma, iant, rsc, dominik.honnef
    CC=golang-codereviews
    https://golang.org/cl/57100043
    2dc759d7
a.h 3.87 KB