[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 10:54:56 PST 2025
jhuber6 wrote:
Good
> > Right now it works as I'd expect, it passes --offload-arch=sm_52 to the sm_52 compilation, but no other architecture.
>
> What happens with that `--offload-arch=sm_52` when cc1 sees it? Ideally there should be either an unused argument warning, or an error is the option is not accepted by cc1. Currently cc1 errors out with `error: unknown argument: '--offload-arch=sm_52`. If it continues to do so with your change, then we're fine.
I don't think there's any use of `--offload-arch` outside of the driver. If we're passing an arch list it'd be better to query it from the toolchain somehow.
https://github.com/llvm/llvm-project/pull/125421
More information about the cfe-commits
mailing list