aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/hardware.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/hardware.rb')
-rw-r--r--Library/Homebrew/hardware.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/hardware.rb b/Library/Homebrew/hardware.rb
index 69f87eade..547c3c318 100644
--- a/Library/Homebrew/hardware.rb
+++ b/Library/Homebrew/hardware.rb
@@ -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