diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-01-26 22:56:08 +0000 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-01-26 23:50:17 +0000 |
commit | d3e61747da7f27c5dd67a514ff533be54df95b85 (patch) | |
tree | 2cd6c9c6892d7fd9502cb12839d80d5eec80be79 | |
parent | 7037c15e19582cb192cb1edfa7e2c1bf46746ee5 (diff) | |
download | go-d3e61747da7f27c5dd67a514ff533be54df95b85.tar.gz go-d3e61747da7f27c5dd67a514ff533be54df95b85.zip |
doc: mention the need for a C compiler for cgo support
Fixes #13954
Change-Id: I4c01e9bb3fb08e8b9fa14d4c59b7ea824ba3f0c9
Reviewed-on: https://go-review.googlesource.com/18937
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
-rw-r--r-- | doc/install-source.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/install-source.html b/doc/install-source.html index 7c1194a22c..332c72097e 100644 --- a/doc/install-source.html +++ b/doc/install-source.html @@ -173,6 +173,21 @@ follow the instructions on the <a href="http://git-scm.com/downloads">Git downloads</a> page. </p> +<h2 id="ccompiler">(Optional) Install a C compiler</h2> + +<p> +To build a Go installation +with <code><a href="/cmd/cgo">cgo</a></code> support, which permits Go +programs to import C libraries, a C compiler such as <code>gcc</code> +or <code>clang</code> must be installed first. Do this using whatever +installation method is standard on the system. +</p> + +<p> +To build without <code>cgo</code>, set the environment variable +<code>CGO_ENABLED=0</code> before running <code>all.bash</code> or +<code>make.bash</code>. +</p> <h2 id="fetch">Fetch the repository</h2> |