From: Peter Collingbourne Date: Wed, 9 Jul 2014 17:04:38 +0000 (-0700) Subject: cmd/go: use $CC to build _cgo_defun.c X-Git-Tag: go1.4beta1~1132 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5512f6f3b333c97207a860cf89d78edf6bb38940;p=gostls13.git cmd/go: use $CC to build _cgo_defun.c LGTM=dave, iant R=iant, dave CC=golang-codereviews https://golang.org/cl/112000043 --- diff --git a/src/cmd/go/build.go b/src/cmd/go/build.go index 7a09471fa2..7eb9841dae 100644 --- a/src/cmd/go/build.go +++ b/src/cmd/go/build.go @@ -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) }