Revert "Revert "Add a test showing that lto produces relaxable relocations.""
This reverts commit r273247.
lld should always use the new relocations.
llvm-svn: 273266
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index 81ffa87..5be2e2a 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -279,6 +279,10 @@
if (!T)
fatal("target not found: " + Msg);
TargetOptions Options = InitTargetOptionsFromCodeGenFlags();
+
+ // lld supports the new relocations.
+ Options.RelaxELFRelocations = true;
+
Reloc::Model R = Config->Pic ? Reloc::PIC_ : Reloc::Static;
auto CreateTargetMachine = [&]() {