]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix linux-amd64-clang builder
authorDave Cheney <dave@cheney.net>
Fri, 1 May 2015 00:49:36 +0000 (10:49 +1000)
committerDave Cheney <dave@cheney.net>
Tue, 5 May 2015 21:29:57 +0000 (21:29 +0000)
commit21cb062540b337b9e3820e7a085604cf6277034e
tree850491ced88064caec726caac47c772dc5acc91a
parent325642ee061edab0d3aaccb71b9623b2e8e654ab
cmd/go: fix linux-amd64-clang builder

Fixes #10660

Fix the clang only builder by passing -extld down to the linker when needed.
The build passed on most hosts because gcc is almost always present. The bug
was verified by symlinking bin/false in place of gcc in my $PATH and running
the build.

Also, resolve a TODO and move the support logic into its own function.

Tested manually

    env CC=clang-3.5 ./all.bash # linux/amd64
    env CC=gcc-4.8 ./all.bash # linux/amd64
    ./all.bash # linux/amd64
    ./all.bash # darwin/amd64

Change-Id: I4e27a1119356e295500a0d19ad7a4ec14207bf10
Reviewed-on: https://go-review.googlesource.com/9526
Run-TryBot: Dave Cheney <dave@cheney.net>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/build.go