Move oldest_cpu to Hardware
This commit is contained in:
parent
057ed6b4fb
commit
159b9d8e2d
@ -328,7 +328,7 @@ module HomebrewEnvExtension
|
||||
append flags, xarch unless xarch.empty?
|
||||
|
||||
if ARGV.build_bottle?
|
||||
append flags, Hardware::CPU.optimization_flags[MacOS.oldest_cpu]
|
||||
append flags, Hardware::CPU.optimization_flags[Hardware.oldest_cpu]
|
||||
else
|
||||
# Don't set -msse3 and older flags because -march does that for us
|
||||
append flags, map.fetch(Hardware::CPU.family, default)
|
||||
|
||||
@ -45,4 +45,16 @@ class Hardware
|
||||
Hardware.processor_count
|
||||
end
|
||||
end
|
||||
|
||||
def self.oldest_cpu
|
||||
if Hardware::CPU.type == :intel
|
||||
if Hardware::CPU.is_64_bit?
|
||||
:core2
|
||||
else
|
||||
:core
|
||||
end
|
||||
else
|
||||
Hardware::CPU.family
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -28,18 +28,6 @@ module MacOS extend self
|
||||
end
|
||||
end
|
||||
|
||||
def oldest_cpu
|
||||
if Hardware::CPU.type == :intel
|
||||
if Hardware::CPU.is_64_bit?
|
||||
:core2
|
||||
else
|
||||
:core
|
||||
end
|
||||
else
|
||||
Hardware::CPU.family
|
||||
end
|
||||
end
|
||||
|
||||
def locate tool
|
||||
# Don't call tools (cc, make, strip, etc.) directly!
|
||||
# Give the name of the binary you look for as a string to this method
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user