aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2013-09-02 22:20:38 -0500
committerMax Howell2013-09-02 22:20:38 -0500
commit5f5ac7aa5c59df270c2f04060ec8a8a4892d4f01 (patch)
treeaa9eff86caed4bbdd2a9c204a0fa74c350c4f3eb /Library
parent61443c00c20c988a77d2f768fd180c47afa97bba (diff)
downloadhomebrew-5f5ac7aa5c59df270c2f04060ec8a8a4892d4f01.tar.bz2
Go builds with clang, without cgo module
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/go.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/Library/Formula/go.rb b/Library/Formula/go.rb
index 0abe8b50e..2df21c511 100644
--- a/Library/Formula/go.rb
+++ b/Library/Formula/go.rb
@@ -14,16 +14,17 @@ class Go < Formula
option 'cross-compile-common', "Build the cross-compilers and runtime support for darwin, linux and windows"
option 'without-cgo', "Build without cgo"
- fails_with :clang do
- cause "clang: error: no such file or directory: 'libgcc.a'"
- end
-
def install
# install the completion scripts
bash_completion.install 'misc/bash/go' => 'go-completion.bash'
zsh_completion.install 'misc/zsh/go' => 'go'
- cgo = build.with? 'cgo'
+ cgo = if ENV.cc == :clang
+ # this module cannot build with clang… yet.
+ false
+ else
+ build.with? 'cgo'
+ end
if build.include? 'cross-compile-all'
targets = [