Remove options.RelaxELFRelocations
This TargetOption controls whether LLVM should enable
R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX relocations, which are
supported by GNU ld >= 2.26, which is considered a very old release now.
Setting the option to false is no longer necessary.
Do you know what the gnu ld version is that introduced support? Keeping a few lines of code in to keep working with whatever ancient ld someone is using in some obscure toolchain seems worthwhile to me. Unless there's some performance benefit to relaxing relocations? I'm not sure what that even means.
binutils 2.26, released in Jan 2016.
In 2020, I changed clang cmake option ENABLE_X86_RELAX_RELOCATIONS to default to on:
https://github.com/llvm/llvm-project/commit/c41a18cf61790fc898dcda1055c3efbf442c14c0
Setting the option to false makes less sense after 3.5 years...
It's a bit different. You wouldn't expect to build LLVM itself, or link to LLVM on some weird old crufty embedded system from 10 years ago with a bespoke toolchain. But you may well want to produce object files with an AOT usage of libHalide that work with such an ancient toolchain. libHalide isn't compiled and run on embedded platforms, but the object files we produce absolutely are. Hell, we even still support x86-32 on linux.