diff options
author | Ian Lance Taylor <iant@golang.org> | 2015-08-03 12:49:00 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2015-08-04 04:50:07 +0000 |
commit | bc5a6ce6bef1457e2bc8e90fd7f93e0e22a03128 (patch) | |
tree | 07b82cbb5bdb275fd8ebf56cfcfbea0d95fad02c | |
parent | ecead89be9e4cbd75f2bceeb8c288db5fcad311a (diff) | |
download | go-bc5a6ce6bef1457e2bc8e90fd7f93e0e22a03128.tar.gz go-bc5a6ce6bef1457e2bc8e90fd7f93e0e22a03128.zip |
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>
-rw-r--r-- | src/cmd/go/alldocs.go | 8 | ||||
-rw-r--r-- | src/cmd/go/help.go | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 044e776ec0..0f610ddd9a 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -781,14 +781,14 @@ are: -buildmode=c-archive Build the listed main package, plus all packages it imports, into a C archive file. The only callable symbols will be those - functions marked as exported. Requires exactly one main package - to be listed. + functions marked as exported by the cgo tool. Requires exactly + one main package to be listed. -buildmode=c-shared Build the listed main packages, plus all packages that they import, into C shared libraries. The only callable symbols will - be those functions marked as exported. Non-main packages are - ignored. + be those functions marked as exported by the cgo tool. Non-main + packages are ignored. -buildmode=default Listed main packages are built into executables and listed diff --git a/src/cmd/go/help.go b/src/cmd/go/help.go index 591c2f4a07..6142874e0b 100644 --- a/src/cmd/go/help.go +++ b/src/cmd/go/help.go @@ -548,14 +548,14 @@ are: -buildmode=c-archive Build the listed main package, plus all packages it imports, into a C archive file. The only callable symbols will be those - functions marked as exported. Requires exactly one main package - to be listed. + functions marked as exported by the cgo tool. Requires exactly + one main package to be listed. -buildmode=c-shared Build the listed main packages, plus all packages that they import, into C shared libraries. The only callable symbols will - be those functions marked as exported. Non-main packages are - ignored. + be those functions marked as exported by the cgo tool. Non-main + packages are ignored. -buildmode=default Listed main packages are built into executables and listed |