diff options
| author | BrewTestBot | 2015-08-03 13:09:07 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-08-03 13:22:35 +0100 |
| commit | 13d544e11e92ba8ea3788723432046f8dfe4adf9 (patch) | |
| tree | e6da18436d9ce956e6fbe80e3185c67cf3b58808 /Library/Homebrew/os/linux/hardware.rb | |
| parent | 3b68215be793774fafd9ce124a2065f5968f50e5 (diff) | |
| download | brew-13d544e11e92ba8ea3788723432046f8dfe4adf9.tar.bz2 | |
Core files style updates.
Closes Homebrew/homebrew#42354.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/os/linux/hardware.rb')
| -rw-r--r-- | Library/Homebrew/os/linux/hardware.rb | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/Library/Homebrew/os/linux/hardware.rb b/Library/Homebrew/os/linux/hardware.rb index 507639e3a..c8d7f4954 100644 --- a/Library/Homebrew/os/linux/hardware.rb +++ b/Library/Homebrew/os/linux/hardware.rb @@ -1,15 +1,25 @@ module LinuxCPUs OPTIMIZATION_FLAGS = { - :penryn => '-march=core2 -msse4.1', - :core2 => '-march=core2', - :core => '-march=prescott', + :penryn => "-march=core2 -msse4.1", + :core2 => "-march=core2", + :core => "-march=prescott" }.freeze - def optimization_flags; OPTIMIZATION_FLAGS; end + def optimization_flags + OPTIMIZATION_FLAGS + end # Linux supports x86 only, and universal archs do not apply - def arch_32_bit; :i386; end - def arch_64_bit; :x86_64; end - def universal_archs; [].extend ArchitectureListExtension; end + def arch_32_bit + :i386 + end + + def arch_64_bit + :x86_64 + end + + def universal_archs + [].extend ArchitectureListExtension + end def cpuinfo @cpuinfo ||= File.read("/proc/cpuinfo") @@ -42,9 +52,9 @@ module LinuxCPUs @features ||= flags[1..-1].map(&:intern) end - %w[aes altivec avx avx2 lm sse3 ssse3 sse4 sse4_2].each { |flag| + %w[aes altivec avx avx2 lm sse3 ssse3 sse4 sse4_2].each do |flag| define_method(flag + "?") { flags.include? flag } - } + end alias_method :is_64_bit?, :lm? def bits |
