Fangrui Song via llvm-dev
2020-Aug-28 05:15 UTC
[llvm-dev] LLD: Can we make --warn-backrefs the default?
Hi all, LLD's --warn-backrefs is a tool to identify potential incompatible archive selection semantics with traditional Unix linkers. I have improved it (via D77522,D77630 and D77512) to a state where a --warn-backrefs diagnostic almost assuredly means that the link will fail with GNU ld, or the symbol will get different resolution in GNU ld and LLD. My conclusion is that --warn-backrefs is a very useful layering check tool. I just wrote a documentation about the advantage (of GNU ld's archive selection semantics..... But we can do better with --warn-backrefs! GNU ld just reports "undefined reference" with no actionable feedback about the offending archive) https://reviews.llvm.org/D86762 I am wondering whether in the next release we can make --warn-backrefs the default. I have added many known users to the review. (There is no need for --no-warn-backrefs because --warn-backrefs-exclude='*' does the same job)
David Blaikie via llvm-dev
2020-Aug-28 18:15 UTC
[llvm-dev] LLD: Can we make --warn-backrefs the default?
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) On Thu, Aug 27, 2020 at 10:15 PM Fangrui Song via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi all, LLD's --warn-backrefs is a tool to identify potential > incompatible archive selection semantics with traditional Unix linkers. > I have improved it (via D77522,D77630 and D77512) to a state where a > --warn-backrefs diagnostic almost assuredly means that the link will > fail with GNU ld, or the symbol will get different resolution in GNU ld > and LLD. > > My conclusion is that --warn-backrefs is a very useful layering check tool. > I just wrote a documentation about the advantage (of GNU ld's archive > selection semantics..... But we can do better with --warn-backrefs! > GNU ld just reports "undefined reference" with no actionable feedback > about the offending archive) > > https://reviews.llvm.org/D86762 > > I am wondering whether in the next release we can make --warn-backrefs > the default. I have added many known users to the review. > (There is no need for --no-warn-backrefs because > --warn-backrefs-exclude='*' does the same job) > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200828/2fd1a1a3/attachment-0001.html>
Fāng-ruì Sòng via llvm-dev
2020-Aug-31 20:24 UTC
[llvm-dev] LLD: Can we make --warn-backrefs the default?
On Fri, Aug 28, 2020 at 11:16 AM David Blaikie <dblaikie at gmail.com> wrote:> > 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)Yes, we can conduct the "should we enable --warn-backrefs by default" conversation here. Since the semantics --warn-backrefs of are a bit complex, we need a documentation. https://reviews.llvm.org/D86762 is put up to get wording suggestions. Explicitly adding the people to the CC list... FWIW for many code bases, --warn-backrefs should produce no warnings (error if --fatal-warnings). For some code bases, GNU ld may error "undefined reference". --warn-backrefs can catch such problems.> On Thu, Aug 27, 2020 at 10:15 PM Fangrui Song via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >> Hi all, LLD's --warn-backrefs is a tool to identify potential >> incompatible archive selection semantics with traditional Unix linkers. >> I have improved it (via D77522,D77630 and D77512) to a state where a >> --warn-backrefs diagnostic almost assuredly means that the link will >> fail with GNU ld, or the symbol will get different resolution in GNU ld and LLD. >> >> My conclusion is that --warn-backrefs is a very useful layering check tool. >> I just wrote a documentation about the advantage (of GNU ld's archive >> selection semantics..... But we can do better with --warn-backrefs! >> GNU ld just reports "undefined reference" with no actionable feedback >> about the offending archive) >> >> https://reviews.llvm.org/D86762 >> >> I am wondering whether in the next release we can make --warn-backrefs >> the default. I have added many known users to the review. >> (There is no need for --no-warn-backrefs because --warn-backrefs-exclude='*' does the same job) >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- 宋方睿