aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-06-06 16:02:27 -0500
committerJack Nagel2013-06-06 16:02:27 -0500
commit159b9d8e2dd08ab4ad913e56669e961a7767b3d9 (patch)
treec32b79a4006b91b01d6646804503d91837aff17d /Library
parent057ed6b4fb11e906b5e7f652aa4cc6c5ae4cff27 (diff)
downloadbrew-159b9d8e2dd08ab4ad913e56669e961a7767b3d9.tar.bz2
Move oldest_cpu to Hardware
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ENV.rb2
-rw-r--r--Library/Homebrew/hardware.rb12
-rw-r--r--Library/Homebrew/macos.rb12
3 files changed, 13 insertions, 13 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index 273fa6e8c..35f14bf0d 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -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)
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
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb
index e2f55d8a9..bd44ef7ab 100644
--- a/Library/Homebrew/macos.rb
+++ b/Library/Homebrew/macos.rb
@@ -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