Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Xcode 4.2 fixes #9622

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/Homebrew/extend/ENV.rb
Expand Up @@ -103,7 +103,7 @@ def llvm
@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')
Expand Down
15 changes: 10 additions & 5 deletions Library/Homebrew/formula.rb
Expand Up @@ -335,12 +335,17 @@ def std_cmake_parameters

def handle_llvm_failure llvm
if ENV.compiler == :llvm
# version 2335 is the latest version as of Xcode 4.1, so it is the
# version 2336 is the latest version as of Xcode 4.2, so it is the
# latest version we have tested against so we will switch to GCC and
# bump this integer when Xcode 4.2 is released. TODO do that!
if llvm.build.to_i >= 2335
opoo "Formula will not build with LLVM, using GCC"
ENV.gcc :force => true
# bump this integer when Xcode 4.3 is released. TODO do that!
if llvm.build.to_i >= 2336
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:"
Expand Down