<p dir="ltr"><br>
>> OK. I would be ok with a cmake flag for "assume an unknown user<br>
>> supports these", but I don't think the cmake option should be used in<br>
>> TargetOptions.cpp. It should be used in tools where it makes sense. In<br>
>> tree right now that would be just tools/gold and clang.<br>
><br>
><br>
> 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.<br></p>
<p dir="ltr">Because the right value is tool dependent:</p>
<p dir="ltr">* Lld should always use the new relocations.<br>
* Clang has no idea what linker will be used, so has to be very conservative.<br>
* The gold plugin might be able to figure out what linker is using it (not sure).<br>
* Developer tools should default to the new relocations.</p>
<p dir="ltr">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.</p>
<p dir="ltr">Having llvm default to the new behavior and the individual tools override it makes it clear which tools have that requirement.</p>
<p dir="ltr">Cheers,<br>
Rafael <br>
</p>