diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 5ad187926e710..bb74defaa28bf 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -932,9 +932,20 @@ def W_Joined : Joined<["-"], "W">, Group, def Xanalyzer : Separate<["-"], "Xanalyzer">, HelpText<"Pass to the static analyzer">, MetaVarName<"">, Group; -def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[NoXarchOption]>, - HelpText<"Pass to the compiliation if the target matches ">, - MetaVarName<" ">; +def Xarch__ + : JoinedAndSeparate<["-"], "Xarch_">, + Flags<[NoXarchOption]>, + HelpText<"Pass to the compilation if the target matches ">, + DocBrief< + [{Specifies that the argument should only be used if the compilation + target matches the specified architecture. This can be used with the target + CPU, triple architecture, or offloading host and device. It is most useful + for separating behavior undesirable on one of the targets when combining many + compilation jobs, as is commong with offloading. For example, -Xarch_x86_64, + -Xarch_gfx90a, and -Xarch_device are all valid selectors. -Xarch_device will + forward the argument to the offloading device while -Xarch_host will target + the host system, which can be used to suppress incompatible GPU arguments.}]>, + MetaVarName<" ">; def Xarch_host : Separate<["-"], "Xarch_host">, Flags<[NoXarchOption]>, HelpText<"Pass to the CUDA/HIP host compilation">, MetaVarName<"">; def Xarch_device : Separate<["-"], "Xarch_device">, Flags<[NoXarchOption]>,