[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 13:47:09 PST 2025
https://github.com/Artem-B commented:
> > > --offload-arch= isn't an accepted -cc1 argument so it won't be forwarded at all.
> >
> >
> > Silently? That would be wrong, imo. It should be diagnosed somewhere.
>
> It's already an error if you pass it directly via -`Xclang` because it's not an accepted `-cc1` argument. A lot of driver arguments are both driver and `cc1` arguments so those get marshalled or forwarded.
Yes, I'm aware of that. My question is -- with this patch, and my example command above which wants to forward --offload-arch, does `clang -cc1` report an error, or stays silent because the argument "won't be forwarded at all." ?
Perhaps we should take a step back, document desired behavior/interactions between -Xarch, --offload-arch, and OpenMP/CUDA/HIP offloading modes, so we have somewhat consistent (or at least documented) behavior. Right now we seem to chase corner cases.
https://github.com/llvm/llvm-project/pull/125421
More information about the cfe-commits
mailing list