Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep macOS CPU targeting consistent with EOL/supported macOS versions #2633

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions config.nims
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,11 @@ if defined(windows):
if defined(disableMarchNative):
if defined(i386) or defined(amd64):
if defined(macosx):
# https://support.apple.com/kb/sp803
# "macOS Catalina - Technical Specifications": EOL as of 2022-09
# https://support.apple.com/kb/sp833
# "macOS Big Sur - Technical Specifications" lists current oldest
# supported models: MacBook (2015 or later), MacBook Air (2013 or later),
# MacBook Pro (Late 2013 or later), Mac mini (2014 or later), iMac (2014
# or later), iMac Pro (2017 or later), Mac Pro (2013 or later).
#
# These all have Haswell or newer CPUs.
#
# This ensures AVX2, AES-NI, PCLMUL, BMI1, and BMI2 instruction set support.
switch("passC", "-march=haswell -mtune=generic")
switch("passL", "-march=haswell -mtune=generic")
# https://support.apple.com/en-us/102861
# "macOS Ventura is compatible with these computers" lists current oldest
# supported x86 models, all of which have Kaby Lake or newer CPUs.
switch("passC", "-march=skylake -mtune=generic")
switch("passL", "-march=skylake -mtune=generic")
else:
switch("passC", "-mssse3")
switch("passL", "-mssse3")
Expand Down
Loading