Skip to content
Snippets Groups Projects
Commit ec0ae5ee authored by Mike McQuaid's avatar Mike McQuaid
Browse files

Use xcode_path for GCC as well as LLVM.

parent e68a4d3e
No related branches found
No related tags found
No related merge requests found
......@@ -18,15 +18,15 @@ module HomebrewEnvExtension
self['CMAKE_PREFIX_PATH'] = "#{HOMEBREW_PREFIX}"
end
xcode_path = `/usr/bin/xcode-select -print-path`.chomp
xcode_path = "/Developer" if xcode_path.to_s.empty?
if MACOS_VERSION >= 10.6 and (self['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llvm')
xcode_path = `/usr/bin/xcode-select -print-path`.chomp
xcode_path = "/Developer" if xcode_path.to_s.empty?
self['CC'] = "#{xcode_path}/usr/bin/llvm-gcc"
self['CXX'] = "#{xcode_path}/usr/bin/llvm-g++"
cflags = ['-O4'] # link time optimisation baby!
elsif MACOS_VERSION >= 10.6 and (self['HOMEBREW_USE_GCC'] or ARGV.include? '--use-gcc')
self['CC'] = '/usr/bin/gcc'
self['CXX'] = '/usr/bin/g++'
self['CC'] = "#{xcode_path}/usr/bin/gcc"
self['CXX'] = "#{xcode_path}/usr/bin/g++"
cflags = ['-O3']
else
# If these aren't set, many formulae fail to build
......
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