@@ -6,9 +6,9 @@ use std::sync::Arc;
6
6
use std:: sync:: mpsc:: { Receiver , Sender , channel} ;
7
7
use std:: { fs, io, mem, str, thread} ;
8
8
9
- use jobserver:: { Acquired , Client } ;
10
9
use rustc_ast:: attr;
11
10
use rustc_data_structures:: fx:: { FxHashMap , FxIndexMap } ;
11
+ use rustc_data_structures:: jobserver:: { self , Acquired } ;
12
12
use rustc_data_structures:: memmap:: Mmap ;
13
13
use rustc_data_structures:: profiling:: { SelfProfilerRef , VerboseTimingGuard } ;
14
14
use rustc_errors:: emitter:: Emitter ;
@@ -456,7 +456,6 @@ pub(crate) fn start_async_codegen<B: ExtraBackendMethods>(
456
456
metadata_module : Option < CompiledModule > ,
457
457
) -> OngoingCodegen < B > {
458
458
let ( coordinator_send, coordinator_receive) = channel ( ) ;
459
- let sess = tcx. sess ;
460
459
461
460
let crate_attrs = tcx. hir ( ) . attrs ( rustc_hir:: CRATE_HIR_ID ) ;
462
461
let no_builtins = attr:: contains_name ( crate_attrs, sym:: no_builtins) ;
@@ -477,7 +476,6 @@ pub(crate) fn start_async_codegen<B: ExtraBackendMethods>(
477
476
shared_emitter,
478
477
codegen_worker_send,
479
478
coordinator_receive,
480
- sess. jobserver . clone ( ) ,
481
479
Arc :: new ( regular_config) ,
482
480
Arc :: new ( metadata_config) ,
483
481
Arc :: new ( allocator_config) ,
@@ -1093,7 +1091,6 @@ fn start_executing_work<B: ExtraBackendMethods>(
1093
1091
shared_emitter : SharedEmitter ,
1094
1092
codegen_worker_send : Sender < CguMessage > ,
1095
1093
coordinator_receive : Receiver < Box < dyn Any + Send > > ,
1096
- jobserver : Client ,
1097
1094
regular_config : Arc < ModuleConfig > ,
1098
1095
metadata_config : Arc < ModuleConfig > ,
1099
1096
allocator_config : Arc < ModuleConfig > ,
@@ -1145,7 +1142,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
1145
1142
// get tokens on `coordinator_receive` which will
1146
1143
// get managed in the main loop below.
1147
1144
let coordinator_send2 = coordinator_send. clone ( ) ;
1148
- let helper = jobserver
1145
+ let helper = jobserver:: client ( )
1149
1146
. into_helper_thread ( move |token| {
1150
1147
drop ( coordinator_send2. send ( Box :: new ( Message :: Token :: < B > ( token) ) ) ) ;
1151
1148
} )
0 commit comments