Commit d3e61747 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

doc: mention the need for a C compiler for cgo support

Fixes #13954

Change-Id: I4c01e9bb3fb08e8b9fa14d4c59b7ea824ba3f0c9
Reviewed-on: https://go-review.googlesource.com/18937Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
Reviewed-by: 's avatarRob Pike <r@golang.org>
parent 7037c15e
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment