]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: use $CC to build _cgo_defun.c
authorPeter Collingbourne <pcc@google.com>
Wed, 9 Jul 2014 17:04:38 +0000 (10:04 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 9 Jul 2014 17:04:38 +0000 (10:04 -0700)
LGTM=dave, iant
R=iant, dave
CC=golang-codereviews
https://golang.org/cl/112000043

src/cmd/go/build.go

index 7a09471fa257c2c485d2466a62f95485e99a4d3e..7eb9841daefd6d2011b0bd90402f1bb3f7139157 100644 (file)
@@ -1900,8 +1900,7 @@ func (gccgoToolchain) cc(b *builder, p *Package, objdir, ofile, cfile string) er
        if pkgpath := gccgoCleanPkgpath(p); pkgpath != "" {
                defs = append(defs, `-D`, `GOPKGPATH="`+pkgpath+`"`)
        }
-       // TODO: Support using clang here (during gccgo build)?
-       return b.run(p.Dir, p.ImportPath, nil, "gcc", "-Wall", "-g",
+       return b.run(p.Dir, p.ImportPath, nil, envList("CC", defaultCC), "-Wall", "-g",
                "-I", objdir, "-I", inc, "-o", ofile, defs, "-c", cfile)
 }