Enable ThinLTO and incremental compilation #48996
Labels
A-incr-comp
Area: Incremental compilation
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Currently ThinLTO is not compatible with incremental compilation, unfortunately. This is due to the fact that the codegen of an object file is actually dependent on all object files rather than just the one object file, which means we can rarely reuse anything!
ThinLTO, however, is explicitly designed with incrementality in mind. We're just not currently taking advantage of any of it! Last I remember checking in on this there's a good bit of nontrivial work that the incremental ThinLTO requires. Currently the ThinLTO support in rustc is largely a duplicate of that file (so far a duplicate of what we need) which helps us conform to our own requirements and integration better. This would likely best be implemented by tweaking the upstream interfaces to be more what we in rustc desire so we can directly use LLVM's support in this regard.
In any case, I realized we didn't have a tracking issue for this so I wanted to open one! At a high level I'd expect this to be tackled by:
The text was updated successfully, but these errors were encountered: