As an occasionally packager coming from
clang, I find the ability to specify separate
-mtune options in these compilers a nice thing. These switches tell the compiler to generate code that work for a wide range of CPUs, but schedule the code such that it works better with the microarchitectual details of some CPU that may be newer and more popular. At least in theory, it's a nice thing for people.
I checked the codegen documentation, and it seems that the only place that accepts a model or whatever llvm's designator is
target-cpu, which does basically
-march only. I could do what I want by manually removing features, but that would be really tedious.
-mtune, they left a
tune-cpu attribute in the LLVM codegen thing for people to use. Can Rust expose that thing somehow?
tune-cpu is only checked by the x86 target, because when
clang did it GCC was only giving
-mtune to x86. Now GCC is giving that to every arch, so I think a separate LLVM discussion is in order. ARM already put it in their fork.)