incr.comp.: Load dep-graph in the background #46555
Labels
A-incr-comp
Area: Incremental compilation
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
WG-incr-comp
Working group: Incremental compilation
The dependency graph is loaded at the earliest point possibly during the compilation session (after the crate disambiguator has been set):
rust/src/librustc_driver/driver.rs
Line 654 in bd7021f
However, it is only needed for the first time a few passes later:
rust/src/librustc_driver/driver.rs
Line 890 in bd7021f
This was intentional so that we have to possibility to load and decode it the graph on a background thread. One way to implement this is to make
rustc_incremental::load_dep_graph()
start a new thread and return thethread::JoinHandle
and then only join that thread right before the dep-graph is actually needed.The text was updated successfully, but these errors were encountered: