[clang] clang: Add BoundArch argument to addClangTargetOptions (PR #196504)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Fri May 8 08:30:22 PDT 2026


arsenm wrote:

> I'm guessing this is because -march and -mcpu are used inconsistently? I'm hesitant to add such a large refactor when it's not strictly necessary for the information required.

That's a small part of the problem. The more annoying part is figuring out the exact target is not just a matter of parsing -march/-mcpu. Some places use the raw target ID, some places want the target ID suffix split off and the base GPU name. Things are worse when you account for the explicit -m options that should change the target 

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


More information about the cfe-commits mailing list