Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9742c49

Browse files
committed
Port metadata reuse to cg_clif.
1 parent 5a75c07 commit 9742c49

File tree

1 file changed

+15
-0
lines changed
  • compiler/rustc_codegen_cranelift/src/driver

1 file changed

+15
-0
lines changed

‎compiler/rustc_codegen_cranelift/src/driver/aot.rs‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,21 @@ impl OngoingCodegen {
5656
backend_config: &BackendConfig,
5757
) -> (CodegenResults, FxIndexMap<WorkProductId, WorkProduct>) {
5858
let mut work_products = FxIndexMap::default();
59+
60+
if !backend_config.disable_incr_cache {
61+
if let Some(path) = self.metadata.path() {
62+
if let Some((id, product)) =
63+
rustc_incremental::copy_cgu_workproduct_to_incr_comp_cache_dir(
64+
sess,
65+
"metadata",
66+
&[("rmeta", path)],
67+
)
68+
{
69+
work_products.insert(id, product);
70+
}
71+
}
72+
}
73+
5974
let mut modules = vec![];
6075

6176
for module_codegen in self.modules {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /