[clang] [RISCV] Move -mtune=native expansion into riscv::getRISCVTuneCPU. NFC (PR #215891)

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 14 14:52:04 PDT 2026


topperc wrote:

> I think we should reject `-mtune=native:<tunefeatures>`. It wouldn't be portable - as soon as you compile on a different machine you may get errors because those tune features are not supported. At least `-mtune=<cpu>:<tunefeatures>` will always give the same errors.
> 
> It's probably the case that `-mtune=native` should expand to `-mtune=<cpu>:<tunefeatures>` anyway, so the `native` expansion happens before tunefeature parsing.

That was the previous behavior so the patch is NFC now. It's just structured better and includes a comment and test.

https://github.com/llvm/llvm-project/pull/215891


More information about the cfe-commits mailing list