Use -march=native for non-bottle source builds [Linux]
This commit is contained in:
		
							parent
							
								
									5e6e673ec5
								
							
						
					
					
						commit
						23ea066a0f
					
				@ -1 +1,5 @@
 | 
			
		||||
require "extend/os/mac/extend/ENV/shared" if OS.mac?
 | 
			
		||||
if OS.mac?
 | 
			
		||||
  require "extend/os/mac/extend/ENV/shared"
 | 
			
		||||
elsif OS.linux?
 | 
			
		||||
  require "extend/os/linux/extend/ENV/shared"
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										10
									
								
								Library/Homebrew/extend/os/linux/extend/ENV/shared.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Library/Homebrew/extend/os/linux/extend/ENV/shared.rb
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
			
		||||
module SharedEnvExtension
 | 
			
		||||
  # @private
 | 
			
		||||
  def effective_arch
 | 
			
		||||
    if ARGV.build_bottle?
 | 
			
		||||
      ARGV.bottle_arch || Hardware.oldest_cpu
 | 
			
		||||
    else
 | 
			
		||||
      :native
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
@ -7,6 +7,7 @@ module Hardware
 | 
			
		||||
 | 
			
		||||
    class << self
 | 
			
		||||
      OPTIMIZATION_FLAGS = {
 | 
			
		||||
        native:  "-march=native",
 | 
			
		||||
        nehalem: "-march=nehalem",
 | 
			
		||||
        penryn:  "-march=penryn",
 | 
			
		||||
        core2:   "-march=core2",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user