]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: fix build -n output when using swig
authorRuss Cox <rsc@golang.org>
Tue, 10 Sep 2013 16:55:07 +0000 (12:55 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 10 Sep 2013 16:55:07 +0000 (12:55 -0400)
$INTBITS will not be defined, of course, but that's the best we can do.

Fixes #5978.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13253048

src/cmd/go/build.go

index af80be8081ca021d13069293c50f131887a23427..f355044d79a76d8f79e789cfc0aa6bdc0ea488b6 100644 (file)
@@ -2162,6 +2162,9 @@ const i int = 1 << 32
 // Determine the size of int on the target system for the -intgosize option
 // of swig >= 2.0.9
 func (b *builder) swigIntSize(obj string) (intsize string, err error) {
+       if buildN {
+               return "$INTBITS", nil
+       }
        src := filepath.Join(b.work, "swig_intsize.go")
        if err = ioutil.WriteFile(src, []byte(swigIntSizeCode), 0644); err != nil {
                return