[llvm] r273019 - Change RelaxELFRelocations for llc.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 09:30:41 PDT 2016


>> OK. I would be ok with a cmake flag for "assume an unknown user
>> supports these", but I don't think the cmake option should be used in
>> TargetOptions.cpp. It should be used in tools where it makes sense. In
>> tree right now that would be just tools/gold and clang.
>
>
> Why do you think it doesn't make sense to have a global default that all
tools use? I'm not arguing that tools can't override it if they have
additional knowledge, like LTO plugins would have, but it seems to me that
all MC invocations without such knowledge should default to not using the
new relocations...and that it should be possible to change that, if you
happen to know you're on a system with a new linker.

Because the right value is tool dependent:

* Lld should always use the new relocations.
* Clang has no idea what linker will be used, so has to be very
conservative.
* The gold plugin might be able to figure out what linker is using it (not
sure).
* Developer tools should default to the new relocations.

In general when there is a need for compatibility with old external tools,
it is always a tool that has that need, not the llvm library.

Having llvm default to the new behavior and the individual tools override
it makes it clear which tools have that requirement.

Cheers,
Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160621/f8325062/attachment.html>


More information about the llvm-commits mailing list