Skip to content

Commit d5efc8e

Browse files
committed
[Clang][Docs] Document -Xarch_ better
Summary: This argument is esoteric and previously didn't even work consistently across the targets. Now that's fixed we should document it better.
1 parent f7d0370 commit d5efc8e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -932,9 +932,18 @@ def W_Joined : Joined<["-"], "W">, Group<W_Group>,
932932
def Xanalyzer : Separate<["-"], "Xanalyzer">,
933933
HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">,
934934
Group<StaticAnalyzer_Group>;
935-
def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[NoXarchOption]>,
936-
HelpText<"Pass <arg> to the compiliation if the target matches <arch>">,
937-
MetaVarName<"<arch> <arg>">;
935+
def Xarch__
936+
: JoinedAndSeparate<["-"], "Xarch_">,
937+
Flags<[NoXarchOption]>,
938+
HelpText<"Pass <arg> to the compiliation if the target matches <arch>">,
939+
DocBrief<
940+
[{Specifies that the argument should only be used if the compileation
941+
target matches the specified architecture. This can be used with the target
942+
CPU, triple architecture, or offloading host and device. This is most useful
943+
for separating behavior undesirable on one of the targets when combining many
944+
compilation jobs, as is commong with offloading. For example, -Xarch_x86_64,
945+
-Xarch_gfx90a, and -Xarch_device are all valid selectors.}]>,
946+
MetaVarName<"<arch> <arg>">;
938947
def Xarch_host : Separate<["-"], "Xarch_host">, Flags<[NoXarchOption]>,
939948
HelpText<"Pass <arg> to the CUDA/HIP host compilation">, MetaVarName<"<arg>">;
940949
def Xarch_device : Separate<["-"], "Xarch_device">, Flags<[NoXarchOption]>,

0 commit comments

Comments
 (0)