llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.2k stars 11.64k forks source link

Apple x86 processor support list is out of date #64500

Open VoxSciurorum opened 1 year ago

VoxSciurorum commented 1 year ago

clang knows that Mac OS 10.12 dropped support for some old x86 CPUs and will use "penryn" as the target architecture when compiling for 10.12 or newer. Apple has continued to drop old generations of x86 CPUs so that Mac OS 12 and 13 only support chips with AVX-2.
I attached a patch to target the minimum x86 CPU supported by newer versions of Mac OS.

The patch uses architecture names like "ivybridge". For the 64 bit only operating systems the equivalent x86-64-v# versions are

OS 10.15 requires x86-64-v2 (dropped support for 32 bit mode and chips without AVX)

OS 12 requires x86-64-v3 (dropped support for all chips without AVX-2)

apple-x86.diff.txt

llvmbot commented 1 year ago

@llvm/issue-subscribers-clang-driver

EugeneZelenko commented 1 year ago

Please use https://reviews.llvm.org/differential/ for patches.