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, EmitSFrameUnwind)
45MCOPT(
bool, ShowMCInst)
46MCOPT(
bool, FatalWarnings)
48MCOPT(
bool, NoDeprecatedWarn)
49MCOPT(
bool, NoTypeCheck)
50MCOPT(
bool, SaveTempLabels)
52MCOPT(
bool, ImplicitMapSyms)
53MCOPT(
bool, X86RelaxRelocations)
54MCOPT(
bool, X86Sse2Avx)
55MCOPT(std::string, ABIName)
56MCOPT(std::string, AsSecureLogFile)
59#define MCBINDOPT(NAME) \
61 NAME##View = std::addressof(NAME); \
65 "mc-relax-all",
cl::desc(
"When used with filetype=obj, relax all fixups "
66 "in the emitted object file"));
70 "incremental-linker-compatible",
72 "When used with filetype=obj, "
73 "emit an object file which can be used with an incremental linker"));
85 cl::desc(
"Generate debugging info in the 64-bit DWARF format"));
89 "emit-dwarf-unwind",
cl::desc(
"Whether to emit DWARF EH frame entries."),
92 "Always emit EH frame entries"),
95 "Only emit EH frame entries when compact unwind is "
98 "Use target platform default")));
102 "emit-compact-unwind-non-canonical",
104 "Whether to try to emit Compact Unwind for non canonical entries."),
107 MCBINDOPT(EmitCompactUnwindNonCanonical);
110 "gsframe",
cl::desc(
"Whether to emit .sframe unwind sections."),
116 cl::desc(
"Emit internal instruction representation to assembly file"));
120 cl::desc(
"Treat warnings as errors"));
129 "no-deprecated-warn",
cl::desc(
"Suppress all deprecated warnings"));
133 "no-type-check",
cl::desc(
"Suppress type errors (Wasm)"));
137 "save-temp-labels",
cl::desc(
"Don't discard temporary labels"));
141 cl::desc(
"Use CREL relocation format for ELF"));
146 cl::desc(
"Allow mapping symbol at section beginning to be implicit, "
147 "lowering number of mapping symbols at the expense of some "
148 "portability. Recommended for projects that can build all their "
149 "object files using this option"));
153 "x86-relax-relocations",
154 cl::desc(
"Emit GOTPCRELX/REX_GOTPCRELX/CODE_4_GOTPCRELX instead of "
155 "GOTPCREL on x86-64 ELF"),
160 "x86-sse2avx",
cl::desc(
"Specify that the assembler should encode SSE "
161 "instructions with VEX prefix"));
166 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 std::string getABIName()
LLVM_ABI bool getSaveTempLabels()
LLVM_ABI bool getImplicitMapSyms()
LLVM_ABI bool getFatalWarnings()
LLVM_ABI std::string getAsSecureLogFile()
LLVM_ABI bool getRelaxAll()
LLVM_ABI bool getX86RelaxRelocations()
LLVM_ABI bool getShowMCInst()
LLVM_ABI int getDwarfVersion()
LLVM_ABI bool getNoWarn()
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI RegisterMCTargetOptionsFlags()