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, ImplicitMapSyms)
52MCOPT(
bool, X86RelaxRelocations)
53MCOPT(
bool, X86Sse2Avx)
54MCOPT(std::string, ABIName)
55MCOPT(std::string, AsSecureLogFile)
58#define MCBINDOPT(NAME) \
60 NAME##View = std::addressof(NAME); \
64 "mc-relax-all",
cl::desc(
"When used with filetype=obj, relax all fixups "
65 "in the emitted object file"));
69 "incremental-linker-compatible",
71 "When used with filetype=obj, "
72 "emit an object file which can be used with an incremental linker"));
84 cl::desc(
"Generate debugging info in the 64-bit DWARF format"));
88 "emit-dwarf-unwind",
cl::desc(
"Whether to emit DWARF EH frame entries."),
89 cl::init(EmitDwarfUnwindType::Default),
91 "Always emit EH frame entries"),
92 clEnumValN(EmitDwarfUnwindType::NoCompactUnwind,
94 "Only emit EH frame entries when compact unwind is "
96 clEnumValN(EmitDwarfUnwindType::Default,
"default",
97 "Use target platform default")));
101 "emit-compact-unwind-non-canonical",
103 "Whether to try to emit Compact Unwind for non canonical entries."),
106 MCBINDOPT(EmitCompactUnwindNonCanonical);
110 cl::desc(
"Emit internal instruction representation to assembly file"));
114 cl::desc(
"Treat warnings as errors"));
123 "no-deprecated-warn",
cl::desc(
"Suppress all deprecated warnings"));
127 "no-type-check",
cl::desc(
"Suppress type errors (Wasm)"));
131 "save-temp-labels",
cl::desc(
"Don't discard temporary labels"));
135 cl::desc(
"Use CREL relocation format for ELF"));
140 cl::desc(
"Allow mapping symbol at section beginning to be implicit, "
141 "lowering number of mapping symbols at the expense of some "
142 "portability. Recommended for projects that can build all their "
143 "object files using this option"));
147 "x86-relax-relocations",
148 cl::desc(
"Emit GOTPCRELX/REX_GOTPCRELX/CODE_4_GOTPCRELX instead of "
149 "GOTPCREL on x86-64 ELF"),
154 "x86-sse2avx",
cl::desc(
"Specify that the assembler should encode SSE "
155 "instructions with VEX prefix"));
160 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()
bool getImplicitMapSyms()
This is an optimization pass for GlobalISel generic memory operations.
Create this object with static storage to register mc-related command line options.