]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cgo, cmd/go, go/build: sort flag lists
authorRuss Cox <rsc@golang.org>
Wed, 5 Jun 2013 11:14:05 +0000 (07:14 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 5 Jun 2013 11:14:05 +0000 (07:14 -0400)
CFLAGS comes before CPPFLAGS.
Also fix one typo CPPCFLAGS.

Cleanup for CL 8248043.

R=golang-dev, iant, alberto.garcia.hierro
CC=golang-dev
https://golang.org/cl/9965045

src/cmd/cgo/doc.go
src/cmd/go/doc.go
src/cmd/go/list.go
src/cmd/go/pkg.go
src/pkg/go/build/build.go

index fc952f5a47c188fa54acb9a47501eab09517a98f..d9b50cf5c25ce7d0c26a78e76b58894e07632712 100644 (file)
@@ -24,7 +24,7 @@ the C parts of the package.  For example:
        // #include <errno.h>
        import "C"
 
-CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS may be defined with pseudo #cgo directives
+CFLAGS, CPPFLAGS, CXXFLAGS and LDFLAGS may be defined with pseudo #cgo directives
 within these comments to tweak the behavior of gcc.  Values defined
 in multiple directives are concatenated together.  Options prefixed
 by $GOOS, $GOARCH, or $GOOS/$GOARCH are only defined in matching
@@ -44,7 +44,7 @@ For example:
        // #include <png.h>
        import "C"
 
-The CGO_CPPFLAGS, CGO_CFLAGS, CGO_CXXFLAGS and CGO_LDFLAGS environment variables are added
+The CGO_CFLAGS, CGO_CPPFLAGS, CGO_CXXFLAGS and CGO_LDFLAGS environment variables are added
 to the flags derived from these directives.  Package-specific flags should
 be set using the directives, not the environment variables, so that builds
 work in unmodified environments.
index 2fad261e1764588f8bd358b4cc04b6cfe7b2c219..e0d8946bb67fdcaf1f4b70545c8663bf42388191 100644 (file)
@@ -321,13 +321,13 @@ which calls strings.Join. The struct being passed to the template is:
         CXXFiles []string       // .cc, .cxx and .cpp source files
         HFiles   []string       // .h, .hh, .hpp and .hxx source files
         SFiles   []string       // .s source files
-        SysoFiles []string      // .syso object files to add to archive
         SwigFiles []string      // .swig files
         SwigCXXFiles []string   // .swigcxx files
+        SysoFiles []string      // .syso object files to add to archive
 
         // Cgo directives
-        CgoCPPFLAGS  []string // cgo: flags for C preprocessor
         CgoCFLAGS    []string // cgo: flags for C compiler
+        CgoCPPFLAGS  []string // cgo: flags for C preprocessor
         CgoCXXFLAGS  []string // cgo: flags for C++ compiler
         CgoLDFLAGS   []string // cgo: flags for linker
         CgoPkgConfig []string // cgo: pkg-config names
index e3b99bd0df2c943bb9a488087709ead74c3dd284..6b729aaec416bf1e49d535ad2273549d2dc72269 100644 (file)
@@ -49,13 +49,13 @@ which calls strings.Join. The struct being passed to the template is:
         CXXFiles []string       // .cc, .cxx and .cpp source files
         HFiles   []string       // .h, .hh, .hpp and .hxx source files
         SFiles   []string       // .s source files
-        SysoFiles []string      // .syso object files to add to archive
         SwigFiles []string      // .swig files
         SwigCXXFiles []string   // .swigcxx files
+        SysoFiles []string      // .syso object files to add to archive
 
         // Cgo directives
-        CgoCPPFLAGS  []string // cgo: flags for C preprocessor
         CgoCFLAGS    []string // cgo: flags for C compiler
+        CgoCPPFLAGS  []string // cgo: flags for C preprocessor
         CgoCXXFLAGS  []string // cgo: flags for C++ compiler
         CgoLDFLAGS   []string // cgo: flags for linker
         CgoPkgConfig []string // cgo: pkg-config names
index b41ea4af47787a7c1e5d6382db4a6df7474d364a..32d56e96e1bf391604edd90b27c64c8bc5070cbd 100644 (file)
@@ -43,13 +43,13 @@ type Package struct {
        CXXFiles       []string `json:",omitempty"` // .cc, .cpp and .cxx source files
        HFiles         []string `json:",omitempty"` // .h, .hh, .hpp and .hxx source files
        SFiles         []string `json:",omitempty"` // .s source files
-       SysoFiles      []string `json:",omitempty"` // .syso system object files added to package
        SwigFiles      []string `json:",omitempty"` // .swig files
        SwigCXXFiles   []string `json:",omitempty"` // .swigcxx files
+       SysoFiles      []string `json:",omitempty"` // .syso system object files added to package
 
        // Cgo directives
-       CgoCPPFLAGS  []string `json:",omitempty"` // cgo: flags for C preprocessor
        CgoCFLAGS    []string `json:",omitempty"` // cgo: flags for C compiler
+       CgoCPPFLAGS  []string `json:",omitempty"` // cgo: flags for C preprocessor
        CgoCXXFLAGS  []string `json:",omitempty"` // cgo: flags for C++ compiler
        CgoLDFLAGS   []string `json:",omitempty"` // cgo: flags for linker
        CgoPkgConfig []string `json:",omitempty"` // cgo: pkg-config names
@@ -104,11 +104,11 @@ func (p *Package) copyBuild(pp *build.Package) {
        p.CXXFiles = pp.CXXFiles
        p.HFiles = pp.HFiles
        p.SFiles = pp.SFiles
-       p.SysoFiles = pp.SysoFiles
        p.SwigFiles = pp.SwigFiles
        p.SwigCXXFiles = pp.SwigCXXFiles
-       p.CgoCPPFLAGS = pp.CgoCPPFLAGS
+       p.SysoFiles = pp.SysoFiles
        p.CgoCFLAGS = pp.CgoCFLAGS
+       p.CgoCPPFLAGS = pp.CgoCPPFLAGS
        p.CgoCXXFLAGS = pp.CgoCXXFLAGS
        p.CgoLDFLAGS = pp.CgoLDFLAGS
        p.CgoPkgConfig = pp.CgoPkgConfig
index 9608f2e3167512f145e1570a8af64cc16d361fb5..38de9ba07f70738e79892dd5a064c73a7225f829 100644 (file)
@@ -356,13 +356,13 @@ type Package struct {
        CXXFiles       []string // .cc, .cpp and .cxx source files
        HFiles         []string // .h, .hh, .hpp and .hxx source files
        SFiles         []string // .s source files
-       SysoFiles      []string // .syso system object files to add to archive
        SwigFiles      []string // .swig files
        SwigCXXFiles   []string // .swigcxx files
+       SysoFiles      []string // .syso system object files to add to archive
 
        // Cgo directives
-       CgoCPPFLAGS  []string // Cgo CPPFLAGS directives
        CgoCFLAGS    []string // Cgo CFLAGS directives
+       CgoCPPFLAGS  []string // Cgo CPPFLAGS directives
        CgoCXXFLAGS  []string // Cgo CXXFLAGS directives
        CgoLDFLAGS   []string // Cgo LDFLAGS directives
        CgoPkgConfig []string // Cgo pkg-config directives
@@ -857,7 +857,7 @@ func (ctxt *Context) shouldBuild(content []byte) bool {
 }
 
 // saveCgo saves the information from the #cgo lines in the import "C" comment.
-// These lines set CPPCFLAGS, CFLAGS, CXXFLAGS and LDFLAGS and pkg-config directives
+// These lines set CFLAGS, CPPFLAGS, CXXFLAGS and LDFLAGS and pkg-config directives
 // that affect the way cgo's C code is built.
 //
 // TODO(rsc): This duplicates code in cgo.