Author: Joseph Huber Date: 2025-02-19T19:12:24-06:00 New Revision: 007f601f15059520b64c09a32b7bb9d99b845d7e
URL: https://github.com/llvm/llvm-project/commit/007f601f15059520b64c09a32b7bb9d99b845d7e DIFF: https://github.com/llvm/llvm-project/commit/007f601f15059520b64c09a32b7bb9d99b845d7e.diff LOG: [Clang][Docs] Document -Xarch_ better (#127890) Summary: This argument is esoteric and previously didn't even work consistently across the targets. Now that's fixed we should document it better. --------- Co-authored-by: Jan Patrick Lehr <janpatrick.l...@amd.com> Added: Modified: clang/include/clang/Driver/Options.td Removed: ################################################################################ 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<W_Group>, def Xanalyzer : Separate<["-"], "Xanalyzer">, HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">, Group<StaticAnalyzer_Group>; -def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[NoXarchOption]>, - HelpText<"Pass <arg> to the compiliation if the target matches <arch>">, - MetaVarName<"<arch> <arg>">; +def Xarch__ + : JoinedAndSeparate<["-"], "Xarch_">, + Flags<[NoXarchOption]>, + HelpText<"Pass <arg> to the compilation if the target matches <arch>">, + 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<"<arch> <arg>">; def Xarch_host : Separate<["-"], "Xarch_host">, Flags<[NoXarchOption]>, HelpText<"Pass <arg> to the CUDA/HIP host compilation">, MetaVarName<"<arg>">; def Xarch_device : Separate<["-"], "Xarch_device">, Flags<[NoXarchOption]>, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits