cmd/go: document that functions are exported by cgo

The buildmode docs mention exported functions, but don't say anything
about how to export them.  Mention the cgo tool to make this somewhat
clearer.

Fixes #11955.

Change-Id: Ie5420445daa87f5aceec6ad743465d5d32d0a786
Reviewed-on: https://go-review.googlesource.com/13080
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Ian Lance Taylor 2015-08-03 12:49:00 -07:00
parent ecead89be9
commit bc5a6ce6be
2 changed files with 8 additions and 8 deletions

View File

@ -781,14 +781,14 @@ are:
-buildmode=c-archive -buildmode=c-archive
Build the listed main package, plus all packages it imports, Build the listed main package, plus all packages it imports,
into a C archive file. The only callable symbols will be those into a C archive file. The only callable symbols will be those
functions marked as exported. Requires exactly one main package functions marked as exported by the cgo tool. Requires exactly
to be listed. one main package to be listed.
-buildmode=c-shared -buildmode=c-shared
Build the listed main packages, plus all packages that they Build the listed main packages, plus all packages that they
import, into C shared libraries. The only callable symbols will import, into C shared libraries. The only callable symbols will
be those functions marked as exported. Non-main packages are be those functions marked as exported by the cgo tool. Non-main
ignored. packages are ignored.
-buildmode=default -buildmode=default
Listed main packages are built into executables and listed Listed main packages are built into executables and listed

View File

@ -548,14 +548,14 @@ are:
-buildmode=c-archive -buildmode=c-archive
Build the listed main package, plus all packages it imports, Build the listed main package, plus all packages it imports,
into a C archive file. The only callable symbols will be those into a C archive file. The only callable symbols will be those
functions marked as exported. Requires exactly one main package functions marked as exported by the cgo tool. Requires exactly
to be listed. one main package to be listed.
-buildmode=c-shared -buildmode=c-shared
Build the listed main packages, plus all packages that they Build the listed main packages, plus all packages that they
import, into C shared libraries. The only callable symbols will import, into C shared libraries. The only callable symbols will
be those functions marked as exported. Non-main packages are be those functions marked as exported by the cgo tool. Non-main
ignored. packages are ignored.
-buildmode=default -buildmode=default
Listed main packages are built into executables and listed Listed main packages are built into executables and listed