diff options
-rw-r--r-- | llvm/include/llvm/Target/TargetOptions.h | 8 | ||||
-rw-r--r-- | llvm/lib/CodeGen/LLVMTargetMachine.cpp | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/llvm/include/llvm/Target/TargetOptions.h b/llvm/include/llvm/Target/TargetOptions.h index eb272c31bb9..1de8a5baacc 100644 --- a/llvm/include/llvm/Target/TargetOptions.h +++ b/llvm/include/llvm/Target/TargetOptions.h @@ -98,9 +98,9 @@ namespace llvm { GuaranteedTailCallOpt(false), StackAlignmentOverride(0), StackSymbolOrdering(true), EnableFastISel(false), UseInitArray(false), DisableIntegratedAS(false), CompressDebugSections(false), - FunctionSections(false), DataSections(false), - UniqueSectionNames(true), TrapUnreachable(false), EmulatedTLS(false), - FloatABIType(FloatABI::Default), + RelaxELFRelocations(false), FunctionSections(false), + DataSections(false), UniqueSectionNames(true), TrapUnreachable(false), + EmulatedTLS(false), FloatABIType(FloatABI::Default), AllowFPOpFusion(FPOpFusion::Standard), Reciprocals(TargetRecip()), JTType(JumpTable::Single), ThreadModel(ThreadModel::POSIX), EABIVersion(EABI::Default), DebuggerTuning(DebuggerKind::Default), @@ -190,6 +190,8 @@ namespace llvm { /// Compress DWARF debug sections. unsigned CompressDebugSections : 1; + unsigned RelaxELFRelocations : 1; + /// Emit functions into separate sections. unsigned FunctionSections : 1; diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index 2f7f8dfe646..346555a3deb 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp @@ -73,6 +73,8 @@ void LLVMTargetMachine::initAsmInfo() { if (Options.CompressDebugSections) TmpAsmInfo->setCompressDebugSections(DebugCompressionType::DCT_ZlibGnu); + TmpAsmInfo->setRelaxELFRelocations(Options.RelaxELFRelocations); + AsmInfo = TmpAsmInfo; } |