aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShenghou Ma <minux@golang.org>2016-12-17 22:53:38 -0500
committerMinux Ma <minux@golang.org>2016-12-20 05:05:24 +0000
commit5a72bad87ac1152aecd39f7fe1eece88a23b595b (patch)
tree2657d354c2a511e62fc11fabe04eb7aa040781a3
parentc5f16d4e40d0a2d9c2e32a866129d6a40535f57d (diff)
downloadgo-5a72bad87ac1152aecd39f7fe1eece88a23b595b.tar.gz
go-5a72bad87ac1152aecd39f7fe1eece88a23b595b.zip
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 <iant@golang.org>
-rw-r--r--doc/go1.8.html12
1 files changed, 12 insertions, 0 deletions
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.
<h3 id="cmd_cgo">Cgo</h3>
+<p> <!-- CL 31141 -->
+The Go tool now remembers the value of the <code>CGO_ENABLED</code> environment
+variable set during <code>make.bash</code> and applies it to all future compilations
+by default to fix issue <a href="https://golang.org/issue/12808">#12808</a>.
+When doing native compilation, it is rarely necessary to explicitly set
+the <code>CGO_ENABLED</code> environment variable as <code>make.bash</code>
+will detect the correct setting automatically. The main reason to explicitly
+set the <code>CGO_ENABLED</code> environment variable is when your environment
+supports cgo, but you explicitly do not want cgo support, in which case, set
+<code>CGO_ENABLED=0</code> during <code>make.bash</code> or <code>all.bash</code>.
+</p>
+
<p> <!-- CL 29991 -->
The environment variable <code>PKG_CONFIG</code> may now be used to
set the program to run to handle <code>#cgo</code> <code>pkg-config</code>