Skip to content
Snippets Groups Projects
Commit a892e52b authored by Misty De Meo's avatar Misty De Meo
Browse files

Add Hardware::CPU.universal_archs

parent 0f580953
No related branches found
No related tags found
No related merge requests found
require 'mach'
module MacCPUs
OPTIMIZATION_FLAGS = {
:penryn => '-march=core2 -msse4.1',
......@@ -83,6 +85,18 @@ module MacCPUs
type == :intel ? :x86_64 : :ppc64
end
# Returns an array that's been extended with ArchitectureListExtension,
# which provides helpers like #as_arch_flags and #as_cmake_arch_flags.
def universal_archs
# Building 64-bit is a no-go on Tiger, and pretty hit or miss on Leopard.
# Don't even try unless Tigerbrew's experimental 64-bit Leopard support is enabled.
if MacOS.version <= :leopard and !MacOS.prefer_64_bit?
[arch_32_bit].extend ArchitectureListExtension
else
[arch_32_bit, arch_64_bit].extend ArchitectureListExtension
end
end
def altivec?
@altivec ||= sysctl_bool('hw.optional.altivec')
end
......
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