File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -728,26 +728,27 @@ pub(crate) fn run_aot(
728728
729729 let concurrency_limiter = IntoDynSyncSend ( ConcurrencyLimiter :: new ( todo_cgus. len ( ) ) ) ;
730730
731- let modules = tcx . sess . time ( "codegen mono items" , || {
732- let mut modules : Vec < _ > = par_map ( todo_cgus , |( _ , cgu ) | {
733- let dep_node = cgu . codegen_dep_node ( tcx ) ;
734- tcx . dep_graph
735- . with_task (
731+ let modules: Vec < _ > =
732+ tcx . sess . time ( "codegen mono items" , || {
733+ let modules : Vec < _ > = par_map ( todo_cgus , | ( _ , cgu ) | {
734+ let dep_node = cgu . codegen_dep_node ( tcx ) ;
735+ let ( module , _ ) = tcx . dep_graph . with_task (
736736 dep_node,
737737 tcx,
738738 ( global_asm_config. clone ( ) , cgu. name ( ) , concurrency_limiter. acquire ( tcx. dcx ( ) ) ) ,
739739 module_codegen,
740740 Some ( rustc_middle:: dep_graph:: hash_result) ,
741- )
742- . 0
743- } ) ;
744- modules. extend (
745- done_cgus
741+ ) ;
742+ IntoDynSyncSend ( module)
743+ } ) ;
744+ modules
746745 . into_iter ( )
747- . map ( |( _, cgu) | OngoingModuleCodegen :: Sync ( reuse_workproduct_for_cgu ( tcx, cgu) ) ) ,
748- ) ;
749- modules
750- } ) ;
746+ . map ( |module| module. 0 )
747+ . chain ( done_cgus. into_iter ( ) . map ( |( _, cgu) | {
748+ OngoingModuleCodegen :: Sync ( reuse_workproduct_for_cgu ( tcx, cgu) )
749+ } ) )
750+ . collect ( )
751+ } ) ;
751752
752753 let allocator_module = emit_allocator_module ( tcx) ;
753754
You can’t perform that action at this time.
0 commit comments