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 MCSTROPT(NAME) \
28 static cl::opt<std::string> *NAME##View; \
29 StringRef llvm::mc::get##NAME() { \
30 assert(NAME##View && "RegisterMCTargetOptionsFlags not created."); \
34#define MCOPT_EXP(TY, NAME) \
36 std::optional<TY> llvm::mc::getExplicit##NAME() { \
37 if (NAME##View->getNumOccurrences()) { \
38 TY res = *NAME##View; \
41 return std::nullopt; \
45MCOPT(
bool, IncrementalLinkerCompatible)
47MCOPT(
int, DwarfVersion)
50MCOPT(
bool, EmitCompactUnwindNonCanonical)
51MCOPT(
bool, EmitSFrameUnwind)
52MCOPT(
bool, ShowMCInst)
53MCOPT(
bool, FatalWarnings)
55MCOPT(
bool, NoDeprecatedWarn)
56MCOPT(
bool, NoTypeCheck)
57MCOPT(
bool, SaveTempLabels)
59MCOPT(
bool, ImplicitMapSyms)
60MCOPT(
bool, X86RelaxRelocations)
61MCOPT(
bool, X86Sse2Avx)
66#define MCBINDOPT(NAME) \
68 NAME##View = std::addressof(NAME); \
72 "mc-relax-all",
cl::desc(
"When used with filetype=obj, relax all fixups "
73 "in the emitted object file"));
77 "incremental-linker-compatible",
79 "When used with filetype=obj, "
80 "emit an object file which can be used with an incremental linker"));
92 cl::desc(
"Generate debugging info in the 64-bit DWARF format"));
96 "emit-dwarf-unwind",
cl::desc(
"Whether to emit DWARF EH frame entries."),
99 "Always emit EH frame entries"),
102 "Only emit EH frame entries when compact unwind is "
105 "Use target platform default")));
109 "emit-compact-unwind-non-canonical",
111 "Whether to try to emit Compact Unwind for non canonical entries."),
114 MCBINDOPT(EmitCompactUnwindNonCanonical);
117 "gsframe",
cl::desc(
"Whether to emit .sframe unwind sections."),
123 cl::desc(
"Emit internal instruction representation to assembly file"));
127 cl::desc(
"Treat warnings as errors"));
136 "no-deprecated-warn",
cl::desc(
"Suppress all deprecated warnings"));
140 "no-type-check",
cl::desc(
"Suppress type errors (Wasm)"));
144 "save-temp-labels",
cl::desc(
"Don't discard temporary labels"));
148 cl::desc(
"Use CREL relocation format for ELF"));
153 cl::desc(
"Allow mapping symbol at section beginning to be implicit, "
154 "lowering number of mapping symbols at the expense of some "
155 "portability. Recommended for projects that can build all their "
156 "object files using this option"));
160 "x86-relax-relocations",
161 cl::desc(
"Emit GOTPCRELX/REX_GOTPCRELX/CODE_4_GOTPCRELX instead of "
162 "GOTPCREL on x86-64 ELF"),
167 "x86-sse2avx",
cl::desc(
"Specify that the assembler should encode SSE "
168 "instructions with VEX prefix"));
173 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)
LLVM_ABI bool getEmitCompactUnwindNonCanonical()
LLVM_ABI bool getDwarf64()
LLVM_ABI bool getEmitSFrameUnwind()
LLVM_ABI bool getX86Sse2Avx()
LLVM_ABI MCTargetOptions InitMCTargetOptionsFromFlags()
LLVM_ABI bool getIncrementalLinkerCompatible()
LLVM_ABI bool getNoDeprecatedWarn()
LLVM_ABI bool getNoTypeCheck()
LLVM_ABI EmitDwarfUnwindType getEmitDwarfUnwind()
LLVM_ABI bool getSaveTempLabels()
LLVM_ABI bool getImplicitMapSyms()
LLVM_ABI bool getFatalWarnings()
LLVM_ABI bool getRelaxAll()
LLVM_ABI bool getX86RelaxRelocations()
LLVM_ABI bool getShowMCInst()
LLVM_ABI StringRef getAsSecureLogFile()
LLVM_ABI int getDwarfVersion()
LLVM_ABI StringRef getABIName()
LLVM_ABI bool getNoWarn()
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI RegisterMCTargetOptionsFlags()