diff options
author | Fangrui Song <i@maskray.me> | 2024-03-06 23:19:59 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2024-03-06 23:19:59 -0800 |
commit | a3319371970b599ef65ef1567c440fbdc3a330f4 (patch) | |
tree | d63abccdc3bddef6511079dc71585ca5485fa789 /llvm/tools/gold | |
parent | 886ecb3078e5f3a5cffc70408a637242c223c363 (diff) | |
download | llvm-a3319371970b599ef65ef1567c440fbdc3a330f4.zip llvm-a3319371970b599ef65ef1567c440fbdc3a330f4.tar.gz llvm-a3319371970b599ef65ef1567c440fbdc3a330f4.tar.bz2 |
[MC] Move CompressDebugSections/RelaxELFRelocations from TargetOptions/MCAsmInfo to MCTargetOptions
The convention is for such MC-specific options to reside in
MCTargetOptions. However, CompressDebugSections/RelaxELFRelocations do
not follow the convention: `CompressDebugSections` is defined in both
TargetOptions and MCAsmInfo and there is forwarding complexity.
Move the option to MCTargetOptions and hereby simplify the code. Rename
the misleading RelaxELFRelocations to X86RelaxRelocations. llvm-mc
-relax-relocations and llc -x86-relax-relocations can now be unified.
Diffstat (limited to 'llvm/tools/gold')
-rw-r--r-- | llvm/tools/gold/gold-plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index 257832a..b8a33f7 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -857,7 +857,7 @@ static std::unique_ptr<LTO> createLTO(IndexWriteCallback OnIndexWrite, // Disable the new X86 relax relocations since gold might not support them. // FIXME: Check the gold version or add a new option to enable them. - Conf.Options.RelaxELFRelocations = false; + Conf.Options.MCOptions.X86RelaxRelocations = false; // Toggle function/data sections. if (!codegen::getExplicitFunctionSections()) |