llc/clang exact -march target for the current host cpu

974 views Asked by At

I am trying to find a command line option to specify "generate code for this host your are compiling on, it should take advantage of all the CPU features available, and needs not run on any other system" for llvm.

I have fairly recent llvm versions across all the platforms I use, they are all arm, arm64, x86 or x86-64. All code is either C or C++.

Is there a generic option for this for llvm?

1

There are 1 answers

3
jlainema On

The correct command line parameters are: -mtune=native and -mcpu=native