go: host platform must always be the last one built

Each cross-compiler step also rebuilds the host platform.  If
ENABLE_CGO=0 in a later build step, important OS routines (like looking
up x509 certificates in the keychain) are not implemented even for the
host platform.

Closes Homebrew/homebrew#17758.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Joe Shaw 2013-02-11 13:06:22 -05:00 committed by Adam Vandenberg
parent 1092198ba4
commit 7803dd611d

View file

@ -20,19 +20,23 @@ class Go < Formula
if build.include? 'cross-compile-all'
targets = [
['darwin', ['386', 'amd64'], { :cgo => true }],
['linux', ['386', 'amd64', 'arm'], { :cgo => false }],
['freebsd', ['386', 'amd64'], { :cgo => false }],
['openbsd', ['386', 'amd64'], { :cgo => false }],
['windows', ['386', 'amd64'], { :cgo => false }],
# Host platform (darwin/amd64) must always come last
['darwin', ['386', 'amd64'], { :cgo => true }],
]
elsif build.include? 'cross-compile-common'
targets = [
['darwin', ['386', 'amd64'], { :cgo => true }],
['linux', ['386', 'amd64', 'arm'], { :cgo => false }],
['windows', ['386', 'amd64'], { :cgo => false }],
# Host platform (darwin/amd64) must always come last
['darwin', ['386', 'amd64'], { :cgo => true }],
]
else
targets = [