@@ -6,9 +6,9 @@ use std::sync::Arc;
66use std:: sync:: mpsc:: { Receiver , Sender , channel} ;
77use std:: { fs, io, mem, str, thread} ;
88
9- use jobserver:: { Acquired , Client } ;
109use rustc_ast:: attr;
1110use rustc_data_structures:: fx:: { FxHashMap , FxIndexMap } ;
11+ use rustc_data_structures:: jobserver:: { self , Acquired } ;
1212use rustc_data_structures:: memmap:: Mmap ;
1313use rustc_data_structures:: profiling:: { SelfProfilerRef , VerboseTimingGuard } ;
1414use rustc_errors:: emitter:: Emitter ;
@@ -456,7 +456,6 @@ pub(crate) fn start_async_codegen<B: ExtraBackendMethods>(
456456 metadata_module : Option < CompiledModule > ,
457457) -> OngoingCodegen < B > {
458458 let ( coordinator_send, coordinator_receive) = channel ( ) ;
459- let sess = tcx. sess ;
460459
461460 let crate_attrs = tcx. hir ( ) . attrs ( rustc_hir:: CRATE_HIR_ID ) ;
462461 let no_builtins = attr:: contains_name ( crate_attrs, sym:: no_builtins) ;
@@ -477,7 +476,6 @@ pub(crate) fn start_async_codegen<B: ExtraBackendMethods>(
477476 shared_emitter,
478477 codegen_worker_send,
479478 coordinator_receive,
480- sess. jobserver . clone ( ) ,
481479 Arc :: new ( regular_config) ,
482480 Arc :: new ( metadata_config) ,
483481 Arc :: new ( allocator_config) ,
@@ -1093,7 +1091,6 @@ fn start_executing_work<B: ExtraBackendMethods>(
10931091 shared_emitter : SharedEmitter ,
10941092 codegen_worker_send : Sender < CguMessage > ,
10951093 coordinator_receive : Receiver < Box < dyn Any + Send > > ,
1096- jobserver : Client ,
10971094 regular_config : Arc < ModuleConfig > ,
10981095 metadata_config : Arc < ModuleConfig > ,
10991096 allocator_config : Arc < ModuleConfig > ,
@@ -1145,7 +1142,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
11451142 // get tokens on `coordinator_receive` which will
11461143 // get managed in the main loop below.
11471144 let coordinator_send2 = coordinator_send. clone ( ) ;
1148- let helper = jobserver
1145+ let helper = jobserver:: client ( )
11491146 . into_helper_thread ( move |token| {
11501147 drop ( coordinator_send2. send ( Box :: new ( Message :: Token :: < B > ( token) ) ) ) ;
11511148 } )
0 commit comments