aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/go.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Formula/go.rb b/Library/Formula/go.rb
index 8da5f440d..ea70d163d 100644
--- a/Library/Formula/go.rb
+++ b/Library/Formula/go.rb
@@ -37,6 +37,9 @@ class Go < Formula
def patches; DATA; end unless build.devel?
def install
+ # For Clang cgo support Go needs to be able to tell through CC.
+ ENV['CC'] = 'clang' if build.devel? and ENV.compiler == :clang
+
# install the completion scripts
bash_completion.install 'misc/bash/go' => 'go-completion.bash'
zsh_completion.install 'misc/zsh/go' => 'go'