[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 4 11:11:25 PST 2025
jhuber6 wrote:
> > I don't think there's any use of --offload-arch outside of the driver.
>
> I agree. Yet we do need to deal with such nonsensical input in a consistent manner. We do not control what the users give us, but we control how we respond.
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.
```
clang++: warning: argument unused during compilation: '-Xarch_sm_51 --offload-arch=sm_52' [-Wunused-command-line-argument]```
https://github.com/llvm/llvm-project/pull/125421
More information about the cfe-commits
mailing list