20#define MCOPT(TY, NAME) \
21 static cl::opt<TY> *NAME##View; \
22 TY llvm::mc::get##NAME() { \
23 assert(NAME##View && "RegisterMCTargetOptionsFlags not created."); \
27#define MCOPT_EXP(TY, NAME) \
29 std::optional<TY> llvm::mc::getExplicit##NAME() { \
30 if (NAME##View->getNumOccurrences()) { \
31 TY res = *NAME##View; \
34 return std::nullopt; \
38MCOPT(
bool, IncrementalLinkerCompatible)
40MCOPT(
int, DwarfVersion)
43MCOPT(
bool, EmitCompactUnwindNonCanonical)
44MCOPT(
bool, ShowMCInst)
45MCOPT(
bool, FatalWarnings)
47MCOPT(
bool, NoDeprecatedWarn)
48MCOPT(
bool, NoTypeCheck)
49MCOPT(
bool, SaveTempLabels)
51MCOPT(
bool, X86RelaxRelocations)
52MCOPT(
bool, X86Sse2Avx)
53MCOPT(std::string, ABIName)
54MCOPT(std::string, AsSecureLogFile)
57#define MCBINDOPT(NAME) \
59 NAME##View = std::addressof(NAME); \
63 "mc-relax-all",
cl::desc(
"When used with filetype=obj, relax all fixups "
64 "in the emitted object file"));
68 "incremental-linker-compatible",
70 "When used with filetype=obj, "
71 "emit an object file which can be used with an incremental linker"));
83 cl::desc(
"Generate debugging info in the 64-bit DWARF format"));
87 "emit-dwarf-unwind",
cl::desc(
"Whether to emit DWARF EH frame entries."),
88 cl::init(EmitDwarfUnwindType::Default),
90 "Always emit EH frame entries"),
91 clEnumValN(EmitDwarfUnwindType::NoCompactUnwind,
93 "Only emit EH frame entries when compact unwind is "
95 clEnumValN(EmitDwarfUnwindType::Default,
"default",
96 "Use target platform default")));
100 "emit-compact-unwind-non-canonical",
102 "Whether to try to emit Compact Unwind for non canonical entries."),
105 MCBINDOPT(EmitCompactUnwindNonCanonical);
109 cl::desc(
"Emit internal instruction representation to assembly file"));
113 cl::desc(
"Treat warnings as errors"));
122 "no-deprecated-warn",
cl::desc(
"Suppress all deprecated warnings"));
126 "no-type-check",
cl::desc(
"Suppress type errors (Wasm)"));
130 "save-temp-labels",
cl::desc(
"Don't discard temporary labels"));
134 cl::desc(
"Use CREL relocation format for ELF"));
138 "x86-relax-relocations",
140 "Emit GOTPCRELX/REX_GOTPCRELX instead of GOTPCREL on x86-64 ELF"),
145 "x86-sse2avx",
cl::desc(
"Specify that the assembler should encode SSE "
146 "instructions with VEX prefix"));
151 cl::desc(
"The name of the ABI to be targeted from the backend."),
#define clEnumValN(ENUMVAL, FLAGNAME, DESC)
#define MCOPT_EXP(TY, NAME)
ValuesClass values(OptsTy... Options)
Helper to build a ValuesClass by forwarding a variable number of arguments as an initializer list to ...
initializer< Ty > init(const Ty &Val)
bool getIncrementalLinkerCompatible()
std::string getAsSecureLogFile()
MCTargetOptions InitMCTargetOptionsFromFlags()
bool getEmitCompactUnwindNonCanonical()
bool getNoDeprecatedWarn()
EmitDwarfUnwindType getEmitDwarfUnwind()
bool getX86RelaxRelocations()
This is an optimization pass for GlobalISel generic memory operations.
Create this object with static storage to register mc-related command line options.