[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 4 11:22:09 PST 2025


Artem-B wrote:

> Right now if someone passes -Xarch_foo --offload-arch=gfx1030 and foo doesn't match it's not passed and it will print something like this. I figured that's good enough.

This part SGTM, too.

However, I don't think I've seen the answer what happens when we do pass --offload arch to cc1.

E.g. a user may accidentally paste an argument in the wrong place and instead of intended `--offload-arch=sm_52 --offload-arch=sm_80 -Xarch_sm52  --some-option-for_sm52` passes `--offload-arch=sm_52 -Xarch_sm52 --offload-arch=sm_80 --some-option-for_sm52` ?





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


More information about the cfe-commits mailing list