aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew')
-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