<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 31, 2020 at 1:24 PM Fāng-ruì Sòng <<a href="mailto:maskray@google.com">maskray@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Aug 28, 2020 at 11:16 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
><br>
> Would you like to conduct the conversation here, or on the review thread? (I lean towards having them here, but don't mind if folks feel like it keeps the noise down & want to more post a notice saying "hey, here's this thing, if you're interested, go discuss it over there" - more an optional opt-in rather than requiring people to opt-out via muting the thread, etc)<br>
<br>
Yes, we can conduct the "should we enable --warn-backrefs by default"<br>
conversation here. Since the semantics --warn-backrefs of are a bit<br>
complex, we need a documentation. <a href="https://reviews.llvm.org/D86762" rel="noreferrer" target="_blank">https://reviews.llvm.org/D86762</a> is<br>
put up to get wording suggestions. Explicitly adding the people to the<br>
CC list...<br>
<br>
FWIW for many code bases, --warn-backrefs should produce no warnings<br>
(error if --fatal-warnings). For some code bases, GNU ld may error<br>
"undefined reference". --warn-backrefs can catch such problems.<br></blockquote><div><br></div><div>One of the questions raised on the thread there was about different linker semantics. I assume the "--warn-backrefs by default" we're discussing is only related to the ld.lld frontend? Not the Windows linker lld behavior (or ld64 (old or new) lld behavior)?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
> On Thu, Aug 27, 2020 at 10:15 PM Fangrui Song via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>><br>
>> Hi all, LLD's --warn-backrefs is a tool to identify potential<br>
>> incompatible archive selection semantics with traditional Unix linkers.<br>
>> I have improved it (via D77522,D77630 and D77512) to a state where a<br>
>> --warn-backrefs diagnostic almost assuredly means that the link will<br>
>> fail with GNU ld, or the symbol will get different resolution in GNU ld and LLD.<br>
>><br>
>> My conclusion is that --warn-backrefs is a very useful layering check tool.<br>
>> I just wrote a documentation about the advantage (of GNU ld's archive<br>
>> selection semantics..... But we can do better with --warn-backrefs!<br>
>> GNU ld just reports "undefined reference" with no actionable feedback<br>
>> about the offending archive)<br>
>><br>
>> <a href="https://reviews.llvm.org/D86762" rel="noreferrer" target="_blank">https://reviews.llvm.org/D86762</a><br>
>><br>
>> I am wondering whether in the next release we can make --warn-backrefs<br>
>> the default. I have added many known users to the review.<br>
>> (There is no need for --no-warn-backrefs because --warn-backrefs-exclude='*' does the same job)<br>
>> _______________________________________________<br>
>> LLVM Developers mailing list<br>
>> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
>> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
<br>
<br>
-- <br>
宋方睿<br>
</blockquote></div></div>