// If true, emit GOTPCRELX/REX_GOTPCRELX instead of GOTPCREL, on
// X86_64 ELF.
- bool RelaxELFRelocations;
+ bool RelaxELFRelocations = false;
public:
explicit MCAsmInfo();
bool shouldUseLogicalShr() const { return UseLogicalShr; }
bool canRelaxRelocations() const { return RelaxELFRelocations; }
+ void setRelaxELFRelocations(bool V) { RelaxELFRelocations = V; }
};
}
clEnumValEnd));
static cl::opt<bool>
-RelaxELFRel("relax-relocations", cl::init(false),
- cl::desc("Emit R_X86_64_GOTPCRELX instead of R_X86_64_GOTPCREL"));
-
-static cl::opt<bool>
MarkedJTDataRegions("mark-data-regions", cl::init(true),
cl::desc("Mark code section jump table data regions."),
cl::Hidden);
// Always enable the integrated assembler by default.
// Clang also enabled it when the OS is Solaris but that is redundant here.
UseIntegratedAssembler = true;
-
- RelaxELFRelocations = RelaxELFRel;
}
const MCExpr *
static cl::opt<bool>
ShowEncoding("show-encoding", cl::desc("Show instruction encodings"));
+static cl::opt<bool>
+RelaxELFRel("relax-relocations", cl::init(false),
+ cl::desc("Emit R_X86_64_GOTPCRELX instead of R_X86_64_GOTPCREL"));
+
static cl::opt<DebugCompressionType>
CompressDebugSections("compress-debug-sections", cl::ValueOptional,
cl::init(DebugCompressionType::DCT_None),
std::unique_ptr<MCAsmInfo> MAI(TheTarget->createMCAsmInfo(*MRI, TripleName));
assert(MAI && "Unable to create target asm info!");
+ MAI->setRelaxELFRelocations(RelaxELFRel);
+
if (CompressDebugSections != DebugCompressionType::DCT_None) {
if (!zlib::isAvailable()) {
errs() << ProgName