]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: print SWIG warnings
authorMichael Schaller <michael@5challer.de>
Thu, 2 Apr 2015 11:15:08 +0000 (13:15 +0200)
committerIan Lance Taylor <iant@golang.org>
Thu, 2 Apr 2015 16:37:48 +0000 (16:37 +0000)
Fixes #9053

Change-Id: I7b9af3647800671f065c366a6adf9278e64ebec9
Reviewed-on: https://go-review.googlesource.com/8400
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/go/build.go

index 61453c7e2bb11ad0729c2b817b311cc547bcedcc..bdc350161a394b6fc56213316469036da8c6e930 100644 (file)
@@ -2645,16 +2645,20 @@ func (b *builder) swigOne(p *Package, file, obj string, pcCFLAGS []string, cxx b
                args = append(args, "-c++")
        }
 
-       if out, err := b.runOut(p.Dir, p.ImportPath, nil, "swig", args, file); err != nil {
+       out, err := b.runOut(p.Dir, p.ImportPath, nil, "swig", args, file)
+       if err != nil {
                if len(out) > 0 {
                        if bytes.Contains(out, []byte("-intgosize")) || bytes.Contains(out, []byte("-cgo")) {
                                return "", "", errors.New("must have SWIG version >= 3.0.6")
                        }
-                       b.showOutput(p.Dir, p.ImportPath, b.processOutput(out))
+                       b.showOutput(p.Dir, p.ImportPath, b.processOutput(out)) // swig error
                        return "", "", errPrintedOutput
                }
                return "", "", err
        }
+       if len(out) > 0 {
+               b.showOutput(p.Dir, p.ImportPath, b.processOutput(out)) // swig warning
+       }
 
        return obj + goFile, obj + gccBase + gccExt, nil
 }