update macOS baseline x86 CPU architecture to Ivy Bridge (#3929)

This commit is contained in:
tersec 2022-08-02 19:02:56 +00:00 committed by GitHub
parent 9c6a4316aa
commit 52b32c13e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 6 deletions

View File

@ -82,12 +82,17 @@ if defined(disableMarchNative):
if defined(i386) or defined(amd64):
if defined(macosx):
# https://support.apple.com/kb/SP777
# "macOS Mojave - Technical Specifications": EOL as of 2021-10 so macOS
# users on pre-Nehalem must be running either some Hackintosh, or using
# an unsupported macOS version beyond that most recently EOL'd. Nehalem
# supports instruction set extensions through SSE4.2 and POPCNT.
switch("passC", "-march=nehalem")
switch("passL", "-march=nehalem")
# "macOS Mojave - Technical Specifications": EOL as of 2021-10
# https://support.apple.com/kb/SP803
# "macOS Catalina - Technical Specifications" lists current oldest
# supported models: MacBook Air (Mid 2012 or newer), MacBook Pro
# (Mid 2012 or newer), Mac mini (Late 2012 or newer), and iMac (Late 2012
# or newer). These all have Ivy Bridge CPUs or newer.
#
# This ensures AVX, AES, PCLMUL, FSGSBASE, RDRND, and F16C instruction
# set support.
switch("passC", "-march=ivybridge")
switch("passL", "-march=ivybridge")
else:
switch("passC", "-mssse3")
switch("passL", "-mssse3")