diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2020-10-10 15:14:58 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2020-10-10 15:14:58 +0200 |
| commit | 69f45cd96517b4e380044b7d4593899e77afc0ae (patch) | |
| tree | 90b79803fdb55651e958100cab0d2b0707eca499 /compiler/rustc_interface/src | |
| parent | 46f2f023b0d02502a5a9b64b23247207b2279bfe (diff) | |
| download | rust-69f45cd96517b4e380044b7d4593899e77afc0ae.tar.gz rust-69f45cd96517b4e380044b7d4593899e77afc0ae.zip | |
Move save_work_product_index call out of cg_llvm
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/queries.rs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/compiler/rustc_interface/src/queries.rs b/compiler/rustc_interface/src/queries.rs index 8b82217a91a..b7e4c097c90 100644 --- a/compiler/rustc_interface/src/queries.rs +++ b/compiler/rustc_interface/src/queries.rs @@ -356,10 +356,18 @@ pub struct Linker { impl Linker { pub fn link(self) -> Result<()> { - let codegen_results = - self.codegen_backend.join_codegen(self.ongoing_codegen, &self.sess, &self.dep_graph)?; - let prof = self.sess.prof.clone(); + let (codegen_results, work_products) = + self.codegen_backend.join_codegen(self.ongoing_codegen, &self.sess)?; + + self.sess.compile_status()?; + + let sess = &self.sess; let dep_graph = self.dep_graph; + sess.time("serialize_work_products", || { + rustc_incremental::save_work_product_index(&sess, &dep_graph, work_products) + }); + + let prof = self.sess.prof.clone(); prof.generic_activity("drop_dep_graph").run(move || drop(dep_graph)); if !self |
