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?
|
append flags, xarch unless xarch.empty?
|
||||||
|
|
||||||
if ARGV.build_bottle?
|
if ARGV.build_bottle?
|
||||||
append flags, Hardware::CPU.optimization_flags[MacOS.oldest_cpu]
|
append flags, Hardware::CPU.optimization_flags[Hardware.oldest_cpu]
|
||||||
else
|
else
|
||||||
# Don't set -msse3 and older flags because -march does that for us
|
# Don't set -msse3 and older flags because -march does that for us
|
||||||
append flags, map.fetch(Hardware::CPU.family, default)
|
append flags, map.fetch(Hardware::CPU.family, default)
|
||||||
|
|||||||
@ -45,4 +45,16 @@ class Hardware
|
|||||||
Hardware.processor_count
|
Hardware.processor_count
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|||||||
@ -28,18 +28,6 @@ module MacOS extend self
|
|||||||
end
|
end
|
||||||
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
|
def locate tool
|
||||||
# Don't call tools (cc, make, strip, etc.) directly!
|
# Don't call tools (cc, make, strip, etc.) directly!
|
||||||
# Give the name of the binary you look for as a string to this method
|
# Give the name of the binary you look for as a string to this method
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user