aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2012-01-16 20:05:51 +0000
committerMike McQuaid2012-01-16 21:00:24 +0000
commit555e7ff89317a2d3a01480947d59c38156e8fada (patch)
treeafd3b9f8ee5c99aba92180416b6b5bb56df2179e /Library
parentc28779d4e09415da5997e65e268fdbee44314115 (diff)
downloadbrew-555e7ff89317a2d3a01480947d59c38156e8fada.tar.bz2
Don't try and use GCC on Xcode 4.2: it's gone Jim.
Closes Homebrew/homebrew#9622. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ENV.rb2
-rw-r--r--Library/Homebrew/formula.rb9
2 files changed, 8 insertions, 3 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index 60d6e05d0..00a911555 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -103,7 +103,7 @@ module HomebrewEnvExtension
@compiler = :llvm
end
- def clang
+ def clang args = {}
self['CC'] = "/usr/bin/clang"
self['CXX'] = "/usr/bin/clang++"
replace_in_cflags(/-Xarch_i386 (-march=\S*)/, '\1')
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index b781681f8..b4763f8fb 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -339,8 +339,13 @@ class Formula
# latest version we have tested against so we will switch to GCC and
# bump this integer when Xcode 4.3 is released. TODO do that!
if llvm.build.to_i >= 2336
- opoo "Formula will not build with LLVM, using GCC"
- ENV.gcc :force => true
+ if MacOS.xcode_version < "4.2"
+ opoo "Formula will not build with LLVM, using GCC"
+ ENV.gcc :force => true
+ else
+ opoo "Formula will not build with LLVM, trying Clang"
+ ENV.clang :force => true
+ end
return
end
opoo "Building with LLVM, but this formula is reported to not work with LLVM:"