Spec-Zone.ru › Homebrew

Module: OS::Mac::Hardware::ClassMethods Private

Defined in:
extend/os/mac/hardware.rb

This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.

Instance Method Summary collapse

  • #oldest_cpu(version = nil) ⇒ Symbol private

Instance Method Details

#oldest_cpu(version = nil) ⇒ Symbol

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Parameters:

  • version (MacOSVersion, nil) (defaults to: nil)

Returns:

  • (Symbol)


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'extend/os/mac/hardware.rb', line 9

def oldest_cpu(version = nil)
  version = if version
    MacOSVersion.new(version.to_s)
  else
    MacOS.version
  end
  if ::Hardware::CPU.arm64?
    :arm_vortex_tempest
  # This cannot use a newer CPU e.g. haswell because Rosetta 2 does not
  # support AVX instructions in bottles:
  #   https://github.com/Homebrew/homebrew-core/issues/67713
  elsif version >= :ventura
    :westmere
  elsif version >= :catalina
    :nehalem
  else
    super
  end
end

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/OS/Mac/Hardware/ClassMethods.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API