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

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 9 08:22:32 PDT 2026


jhuber6 wrote:

> I've been battling figuring out when I have a "target ID" and when it's the actual CPU name, none of which are useful because I just want the OffloadArch, which not all targets even have definitions for.

The target-id itself was a huge mistake, I would've rejected it if it were proposed today.

> IMO everywhere that has an OffloadKind argument must have an accompanying bound arch; they shouldn't be separable. I have another patch that turns this into a better behaved struct.

I didn't remember that we used the OffloadKind in these methods, that also seems a bit strange as I would've figured that would be implicit in the JobAction, but we don't have access to that here?

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


More information about the cfe-commits mailing list