[clang] ba9590d - [Clang][Docs] Add help test to `-march` and `-mcpu` to suggest `-mcpu=help`
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Mon May 22 08:28:55 PDT 2023
Author: Joseph Huber
Date: 2023-05-22T10:28:46-05:00
New Revision: ba9590d8bc76f9d410a626c26a3d55e1381de4aa
URL: https://github.com/llvm/llvm-project/commit/ba9590d8bc76f9d410a626c26a3d55e1381de4aa
DIFF: https://github.com/llvm/llvm-project/commit/ba9590d8bc76f9d410a626c26a3d55e1381de4aa.diff
LOG: [Clang][Docs] Add help test to `-march` and `-mcpu` to suggest `-mcpu=help`
Currently there is no documentation for these flags, users might find it
confusing to know which values are permitted. This change simply adds
documentation to suggest using `-mcpu=help` to list the availible target
names.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D151098
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 3f792ebce6eac..4907551fe699b 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -3494,7 +3494,8 @@ def mappletvsimulator_version_min_EQ : Joined<["-"], "mappletvsimulator-version-
def mwatchos_version_min_EQ : Joined<["-"], "mwatchos-version-min=">, Group<m_Group>;
def mwatchos_simulator_version_min_EQ : Joined<["-"], "mwatchos-simulator-version-min=">;
def mwatchsimulator_version_min_EQ : Joined<["-"], "mwatchsimulator-version-min=">, Alias<mwatchos_simulator_version_min_EQ>;
-def march_EQ : Joined<["-"], "march=">, Group<m_Group>, Flags<[CoreOption]>;
+def march_EQ : Joined<["-"], "march=">, Group<m_Group>, Flags<[CoreOption]>,
+ HelpText<"For a list of availible architectures for the target use '-mcpu=help'">;
def masm_EQ : Joined<["-"], "masm=">, Group<m_Group>, Flags<[NoXarchOption]>;
def inline_asm_EQ : Joined<["-"], "inline-asm=">, Group<m_Group>, Flags<[CC1Option]>,
Values<"att,intel">,
@@ -3518,7 +3519,8 @@ def mthreads : Joined<["-"], "mthreads">, Group<m_Group>, Flags<[NoXarchOption]>
def mguard_EQ : Joined<["-"], "mguard=">, Group<m_Group>, Flags<[NoXarchOption]>,
HelpText<"Enable or disable Control Flow Guard checks and guard tables emission">,
Values<"none,cf,cf-nochecks">;
-def mcpu_EQ : Joined<["-"], "mcpu=">, Group<m_Group>;
+def mcpu_EQ : Joined<["-"], "mcpu=">, Group<m_Group>,
+ HelpText<"For a list of availible CPUs for the target use '-mcpu=help'">;
def mmcu_EQ : Joined<["-"], "mmcu=">, Group<m_Group>;
def msim : Flag<["-"], "msim">, Group<m_Group>;
def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group<m_Group>;
More information about the cfe-commits
mailing list