From 655e2fa8082320ad74f6d443a21cff1a542ab78f Mon Sep 17 00:00:00 2001 From: tersec Date: Wed, 19 Oct 2022 23:55:01 +0200 Subject: [PATCH] only support macOS hardware supported by non-EOL macOS software (#4246) --- config.nims | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/config.nims b/config.nims index e2ce60654..2b51b5c77 100644 --- a/config.nims +++ b/config.nims @@ -87,18 +87,19 @@ if defined(windows): 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 - # 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. + # 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). # - # This ensures AVX, AES, PCLMUL, FSGSBASE, RDRND, and F16C instruction - # set support. - switch("passC", "-march=ivybridge") - switch("passL", "-march=ivybridge") + # 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") else: switch("passC", "-mssse3") switch("passL", "-mssse3")