
Starting with Xcode 12 Beta 2, builds that used to work on Apple Silicon now break due to `Hardware#oldest_cpu` returning `:nehalem` [1]. This commit is the first in a series of improvements to `Hardware#oldest_cpu`. It resolves the Xcode 12 Beta 2 issue for now. [1]: https://github.com/Homebrew/brew/issues/7857#issuecomment-655536261
14 lines
242 B
Ruby
14 lines
242 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Hardware
|
|
def self.oldest_cpu(version = MacOS.version)
|
|
if CPU.arch == :arm64
|
|
:arm_vortex_tempest
|
|
elsif version >= :mojave
|
|
:nehalem
|
|
else
|
|
generic_oldest_cpu
|
|
end
|
|
end
|
|
end
|