@@ -1638,9 +1638,9 @@ fn start_executing_work(tcx: TyCtxt,
16381638 needs_lto. push ( result) ;
16391639 }
16401640 Message :: Done { result : Err ( ( ) ) , worker_id : _ } => {
1641- shared_emitter. fatal ( "aborting due to worker thread panic " ) ;
1641+ shared_emitter. fatal ( "aborting due to worker thread failure " ) ;
16421642 // Exit the coordinator thread
1643- panic ! ( "aborting due to worker thread panic " )
1643+ panic ! ( "aborting due to worker thread failure " )
16441644 }
16451645 Message :: TranslateItem => {
16461646 bug ! ( "the coordinator should not receive translation requests" )
@@ -1741,23 +1741,16 @@ fn spawn_work(cgcx: CodegenContext, work: WorkItem) {
17411741 // Execute the work itself, and if it finishes successfully then flag
17421742 // ourselves as a success as well.
17431743 //
1744- // Note that we ignore the result coming out of `execute_work_item`
1745- // which will tell us if the worker failed with a `FatalError`. If that
1746- // has happened, however, then a diagnostic was sent off to the main
1747- // thread, along with an `AbortIfErrors` message. In that case the main
1748- // thread is already exiting anyway most likely.
1749- //
1750- // In any case, there's no need for us to take further action here, so
1751- // we just ignore the result and then send off our message saying that
1752- // we're done, which if `execute_work_item` failed is unlikely to be
1753- // seen by the main thread, but hey we might as well try anyway.
1744+ // Note that we ignore any `FatalError` coming out of `execute_work_item`,
1745+ // as a diagnostic was already sent off to the main thread - just
1746+ // surface that there was an error in this worker.
17541747 bomb. result = {
17551748 let _timing_guard = cgcx. time_graph . as_ref ( ) . map ( |tg| {
17561749 tg. start ( time_graph:: TimelineId ( cgcx. worker ) ,
17571750 LLVM_WORK_PACKAGE_KIND ,
17581751 & work. name ( ) )
17591752 } ) ;
1760- Some ( execute_work_item ( & cgcx, work) . unwrap ( ) )
1753+ execute_work_item ( & cgcx, work) . ok ( )
17611754 } ;
17621755 } ) ;
17631756}
0 commit comments