From: Lin Lin Date: Thu, 27 Feb 2025 00:43:12 +0000 (+0000) Subject: cmd/go: update c document X-Git-Tag: go1.25rc1~877 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=01351209225d609f8012e2406550211137716727;p=gostls13.git cmd/go: update c document Fixes: #11875 Change-Id: I0ea2c3e94d7d1647c2aaa3d488ac3c1f5fb6cb18 GitHub-Last-Rev: 7512b33f055aa225d365d6c949a53778834e8dcd GitHub-Pull-Request: golang/go#71966 Reviewed-on: https://go-review.googlesource.com/c/go/+/652675 LUCI-TryBot-Result: Go LUCI Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Reviewed-by: Michael Matloob --- diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 7805f86357..dba37e891d 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -2255,7 +2255,9 @@ // interfacing between languages. For information on SWIG see // https://swig.org/. When running go build, any file with a .swig // extension will be passed to SWIG. Any file with a .swigcxx extension -// will be passed to SWIG with the -c++ option. +// will be passed to SWIG with the -c++ option. A package can't be just +// a .swig or .swigcxx file; there must be at least one .go file, even if +// it has just a package clause. // // When either cgo or SWIG is used, go build will pass any .c, .m, .s, .S // or .sx files to the C compiler, and any .cc, .cpp, .cxx files to the C++ diff --git a/src/cmd/go/internal/help/helpdoc.go b/src/cmd/go/internal/help/helpdoc.go index 4adabfbbd4..e08b8c7a5a 100644 --- a/src/cmd/go/internal/help/helpdoc.go +++ b/src/cmd/go/internal/help/helpdoc.go @@ -19,7 +19,9 @@ The second is the SWIG program, which is a general tool for interfacing between languages. For information on SWIG see https://swig.org/. When running go build, any file with a .swig extension will be passed to SWIG. Any file with a .swigcxx extension -will be passed to SWIG with the -c++ option. +will be passed to SWIG with the -c++ option. A package can't be just +a .swig or .swigcxx file; there must be at least one .go file, even if +it has just a package clause. When either cgo or SWIG is used, go build will pass any .c, .m, .s, .S or .sx files to the C compiler, and any .cc, .cpp, .cxx files to the C++