Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Commit

Permalink
go: host platform must always be the last one built
Browse files Browse the repository at this point in the history
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 #17758.

Signed-off-by: Adam Vandenberg <[email protected]>
  • Loading branch information
joeshaw authored and adamv committed Feb 12, 2013
1 parent 123b88f commit 92850b3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Library/Formula/go.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,23 @@ def install

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 = [
Expand Down

0 comments on commit 92850b3

Please sign in to comment.