[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 3 10:17:27 PST 2025
================
@@ -1115,14 +1117,13 @@ def fno_convergent_functions : Flag<["-"], "fno-convergent-functions">,
// Common offloading options
let Group = offload_Group in {
-def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[NoXarchOption]>,
----------------
yxsamliu wrote:
For HIP, `--offload-arch=` is used by the driver to determine the GPU arch and `-Xarch_gfx906` is allowed to pass GPU arch specific options. The option sequences like `-Xarch_gfx906 --offload-arch=gfx1100` are not meaningful combinations, therefore `Flags<[NoXarchOption]` is used here to diagnose such invalid combinations. Removing this flag will lose diagnositcs for such invalid usage.
Can we diagnose such invalid usage manually?
https://github.com/llvm/llvm-project/pull/125421
More information about the cfe-commits
mailing list