[llvm-dev] LLD: Can we make --warn-backrefs the default?
Fangrui Song via llvm-dev
llvm-dev at lists.llvm.org
Thu Aug 27 22:15:01 PDT 2020
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)
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)
More information about the llvm-dev