This allows reporting undefined symbols before LTO codegen is
run. Since LTO codegen can take a long time, this improves user
experience by avoiding that time spend if the link is going to
fail with undefined symbols anyway.
Fixes PR32400.
Paths
| Differential D62434
[lld-link] diagnose undefined symbols before LTO when possible ClosedPublic Authored by inglorion on May 24 2019, 3:51 PM.
Details Summary This allows reporting undefined symbols before LTO codegen is Fixes PR32400.
Diff Detail
Event Timelineinglorion retitled this revision from [WIP][lld-link] diagnose undefined symbols before LTO if possible to [lld-link] diagnose undefined symbols before LTO when possible. Comment ActionsReady for review now. Comment Actions The basic idea here is: reportRemainingUndefines did two things: it attempts to resolve undefined symbols, and it reports any that remain undefined. This splits reportRemainingUndefines into two functions, one which reports symbols which we know are unresolvable (reportUnresolvable, which we run before LTO) and one which actually does the resolution (resolveRemainingUndefines, which we run after LTO). Then there is a little bit of added code report undefined symbols in bitcode files.
Comment Actions Linking ThinLTO chrome.dll with an undefined symbol: Without this change: ~13 minutes. Comment Actions Generally looking ogod.
Comment Actions LGTM
This revision is now accepted and ready to land.Jul 24 2019, 12:10 PM Closed by commit rL367136: [lld-link] diagnose undefined symbols before LTO when possible (authored by inglorion). · Explain WhyJul 26 2019, 10:57 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 210635 lld/COFF/Driver.cpp
lld/COFF/SymbolTable.h
lld/COFF/SymbolTable.cpp
lld/test/COFF/unresolved-lto-bitcode.ll
lld/test/COFF/unresolved-lto.ll
|
Source -> source