1
Fork 0

Fix CG_CLIF_DISABLE_INCR_CACHE

This commit is contained in:
bjorn3 2023-10-19 12:44:27 +00:00
parent bdc597d512
commit b972010887

View file

@ -394,28 +394,32 @@ pub(crate) fn run_aot(
let modules = tcx.sess.time("codegen mono items", || { let modules = tcx.sess.time("codegen mono items", || {
cgus.iter() cgus.iter()
.enumerate() .enumerate()
.map(|(i, cgu)| match cgu_reuse[i] { .map(|(i, cgu)| {
CguReuse::No => { let cgu_reuse =
let dep_node = cgu.codegen_dep_node(tcx); if backend_config.disable_incr_cache { CguReuse::No } else { cgu_reuse[i] };
tcx.dep_graph match cgu_reuse {
.with_task( CguReuse::No => {
dep_node, let dep_node = cgu.codegen_dep_node(tcx);
tcx, tcx.dep_graph
( .with_task(
backend_config.clone(), dep_node,
global_asm_config.clone(), tcx,
cgu.name(), (
concurrency_limiter.acquire(tcx.sess.diagnostic()), backend_config.clone(),
), global_asm_config.clone(),
module_codegen, cgu.name(),
Some(rustc_middle::dep_graph::hash_result), concurrency_limiter.acquire(tcx.sess.diagnostic()),
) ),
.0 module_codegen,
} Some(rustc_middle::dep_graph::hash_result),
CguReuse::PreLto => unreachable!("LTO not yet supported"), )
CguReuse::PostLto => { .0
concurrency_limiter.job_already_done(); }
OngoingModuleCodegen::Sync(reuse_workproduct_for_cgu(tcx, cgu)) CguReuse::PreLto => unreachable!("LTO not yet supported"),
CguReuse::PostLto => {
concurrency_limiter.job_already_done();
OngoingModuleCodegen::Sync(reuse_workproduct_for_cgu(tcx, cgu))
}
} }
}) })
.collect::<Vec<_>>() .collect::<Vec<_>>()