Why does march=native not work on Apple M1?

Whenever I try to compile any C++ program with march=native on a Macbook with a M1 chip, I get the following error when using clang:
Code Block
clang: error: the clang compiler does not support '-march=native'

However, it used to work on an older Macbook with an Intel CPU. Does clang not support this architecture (yet)?
clang --version gives:
Code Block
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: arm64-apple-darwin20.2.0


Obviously clang does support the architecture. It just doesn't support that flag on arm.

Here's the relevant discussion on LLVM's discussion forums: https://discourse.llvm.org/t/why-does-march-native-not-work-on-apple-m1/2733

clang now supports it. https://www.phoronix.com/scan.php?page=news_item&px=LLVM-Clang-march-native-M1

Why does march=native not work on Apple M1?
 
 
Q