Skip to content
Snippets Groups Projects
Commit a32e738f authored by Max Howell's avatar Max Howell
Browse files

Default to LLVM for Xcodes that default to LLVM

parent cf1a6e18
No related branches found
No related tags found
No related merge requests found
......@@ -21,10 +21,6 @@ module HomebrewEnvExtension
# llvm allows -O4 however it often fails to link and is very slow
cflags = ['-O3']
# If these aren't set, many formulae fail to build
self['CC'] = '/usr/bin/cc'
self['CXX'] = '/usr/bin/c++'
case self.compiler
when :clang then self.clang
when :llvm then self.llvm
......@@ -338,7 +334,7 @@ Please take one of the following actions:
elsif self['HOMEBREW_USE_GCC']
:gcc
else
:gcc
MacOS.default_compiler
end
end
......
......@@ -246,6 +246,14 @@ module MacOS extend self
Pathname.new("/usr/bin/cc").realpath.basename.to_s
end
def default_compiler
case default_cc
when /^gcc/ then :gcc
when /^llvm/ then :llvm
when "clang" then :clang
end
end
def gcc_42_build_version
`/usr/bin/gcc-4.2 -v 2>&1` =~ /build (\d{4,})/
if $1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment