]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: Check error from SWIG link step.
authorAlbert Strasheim <fullung@gmail.com>
Mon, 7 Apr 2014 19:59:55 +0000 (12:59 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 7 Apr 2014 19:59:55 +0000 (12:59 -0700)
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/85070043

src/cmd/go/build.go

index a21c873c85f5f4aab638a91f6611ce992fbff190..d7a1d2182829a3627b36955110a3c633f8583878 100644 (file)
@@ -2522,7 +2522,9 @@ func (b *builder) swigOne(p *Package, file, obj string, cxx bool, intgosize stri
        }
        ldflags := stringList(osldflags[goos], cflags, cgoLDFLAGS, cxxlib)
        target := filepath.Join(obj, soname)
-       b.run(p.Dir, p.ImportPath, nil, b.gccCmd(p.Dir), "-o", target, gccObj, extraObj, ldflags)
+       if err := b.run(p.Dir, p.ImportPath, nil, b.gccCmd(p.Dir), "-o", target, gccObj, extraObj, ldflags); err != nil {
+               return "", "", err
+       }
 
        return obj + goFile, cObj, nil
 }