Determine LLVM location programmatically
Xcode can be installed anywhere, not just /Developer.
This commit is contained in:
		
							parent
							
								
									e2bed20d21
								
							
						
					
					
						commit
						4c6e23c28f
					
				@ -46,7 +46,11 @@ else
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
if MACOS_VERSION >= 10.6 or ENV['HOMEBREW_USE_LLVM']
 | 
			
		||||
  ENV['PATH'] = "/Developer/usr/llvm-gcc-4.2/bin:#{ENV['PATH']}"
 | 
			
		||||
  # you can install Xcode wherever you like you know.
 | 
			
		||||
  prefix = `/usr/bin/xcode-select -print-path`.chomp
 | 
			
		||||
  prefix = "/Developer" if prefix.to_s.empty?
 | 
			
		||||
 | 
			
		||||
  ENV['PATH'] = "#{prefix}/usr/llvm-gcc-4.2/bin:#{ENV['PATH']}"
 | 
			
		||||
  ENV['CC'] = 'llvm-gcc-4.2'
 | 
			
		||||
  ENV['CXX'] = 'llvm-g++-4.2'
 | 
			
		||||
  cflags = ['-O4'] # O4 baby!
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user