From: Shenghou Ma Date: Sun, 18 Dec 2016 03:53:38 +0000 (-0500) Subject: doc/go1.8: document that CGO_ENABLED is sticky X-Git-Tag: go1.8rc1~77 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5a72bad87ac1152aecd39f7fe1eece88a23b595b;p=gostls13.git doc/go1.8: document that CGO_ENABLED is sticky Fixes #18363. Change-Id: Ifc98506d33a6753cd7db8e505cf86d5626fbbad0 Reviewed-on: https://go-review.googlesource.com/34596 Reviewed-by: Ian Lance Taylor --- diff --git a/doc/go1.8.html b/doc/go1.8.html index 95b09dc997..5d9e9f5b39 100644 --- a/doc/go1.8.html +++ b/doc/go1.8.html @@ -327,6 +327,18 @@ see improvements closer to the 32-bit ARM numbers.

Cgo

+

+The Go tool now remembers the value of the CGO_ENABLED environment +variable set during make.bash and applies it to all future compilations +by default to fix issue #12808. +When doing native compilation, it is rarely necessary to explicitly set +the CGO_ENABLED environment variable as make.bash +will detect the correct setting automatically. The main reason to explicitly +set the CGO_ENABLED environment variable is when your environment +supports cgo, but you explicitly do not want cgo support, in which case, set +CGO_ENABLED=0 during make.bash or all.bash. +

+

The environment variable PKG_CONFIG may now be used to set the program to run to handle #cgo pkg-config