summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/CodeGen/CommandFlags.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/CodeGen/CommandFlags.h')
-rw-r--r--llvm/include/llvm/CodeGen/CommandFlags.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/CommandFlags.h b/llvm/include/llvm/CodeGen/CommandFlags.h
index 51013ca07b2..aab522d00de 100644
--- a/llvm/include/llvm/CodeGen/CommandFlags.h
+++ b/llvm/include/llvm/CodeGen/CommandFlags.h
@@ -232,6 +232,11 @@ UseCtors("use-ctors",
cl::desc("Use .ctors instead of .init_array."),
cl::init(false));
+cl::opt<bool> RelaxELFRelocations(
+ "relax-elf-relocations",
+ cl::desc("Emit GOTPCRELX/REX_GOTPCRELX instead of GOTPCREL on x86-64 ELF"),
+ cl::init(false));
+
cl::opt<bool> DataSections("data-sections",
cl::desc("Emit data into separate sections"),
cl::init(false));
@@ -288,6 +293,7 @@ static inline TargetOptions InitTargetOptionsFromCodeGenFlags() {
Options.StackAlignmentOverride = OverrideStackAlignment;
Options.StackSymbolOrdering = StackSymbolOrdering;
Options.UseInitArray = !UseCtors;
+ Options.RelaxELFRelocations = RelaxELFRelocations;
Options.DataSections = DataSections;
Options.FunctionSections = FunctionSections;
Options.UniqueSectionNames = UniqueSectionNames;
OpenPOWER on IntegriCloud