@@ -1295,7 +1295,6 @@ fn start_executing_work<B: ExtraBackendMethods>(
1295
1295
// Each LLVM module is automatically sent back to the coordinator for LTO if
1296
1296
// necessary. There's already optimizations in place to avoid sending work
1297
1297
// back to the coordinator if LTO isn't requested.
1298
- let sysroot = sess. opts . sysroot . clone ( ) ;
1299
1298
return B :: spawn_named_thread ( cgcx. time_trace , "coordinator" . to_string ( ) , move || {
1300
1299
// This is where we collect codegen units that have gone all the way
1301
1300
// through codegen and LLVM.
@@ -1375,7 +1374,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
1375
1374
let ( item, _) =
1376
1375
work_items. pop ( ) . expect ( "queue empty - queue_full_enough() broken?" ) ;
1377
1376
main_thread_state = MainThreadState :: Lending ;
1378
- spawn_work ( sysroot . clone ( ) , & cgcx, coordinator_send. clone ( ) , & mut llvm_start_time, item) ;
1377
+ spawn_work ( & cgcx, coordinator_send. clone ( ) , & mut llvm_start_time, item) ;
1379
1378
}
1380
1379
}
1381
1380
} else if codegen_state == Completed {
@@ -1448,7 +1447,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
1448
1447
MainThreadState :: Idle => {
1449
1448
if let Some ( ( item, _) ) = work_items. pop ( ) {
1450
1449
main_thread_state = MainThreadState :: Lending ;
1451
- spawn_work ( sysroot . clone ( ) , & cgcx, coordinator_send. clone ( ) , & mut llvm_start_time, item) ;
1450
+ spawn_work ( & cgcx, coordinator_send. clone ( ) , & mut llvm_start_time, item) ;
1452
1451
} else {
1453
1452
// There is no unstarted work, so let the main thread
1454
1453
// take over for a running worker. Otherwise the
@@ -1484,7 +1483,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
1484
1483
while running_with_own_token < tokens. len ( )
1485
1484
&& let Some ( ( item, _) ) = work_items. pop ( )
1486
1485
{
1487
- spawn_work ( sysroot . clone ( ) , & cgcx, coordinator_send. clone ( ) , & mut llvm_start_time, item) ;
1486
+ spawn_work ( & cgcx, coordinator_send. clone ( ) , & mut llvm_start_time, item) ;
1488
1487
running_with_own_token += 1 ;
1489
1488
}
1490
1489
}
@@ -1866,7 +1865,6 @@ unsafe impl Send for EnzymeWrapper {}
1866
1865
}
1867
1866
1868
1867
fn spawn_work < ' a , B : ExtraBackendMethods > (
1869
- sysroot : Sysroot ,
1870
1868
cgcx : & ' a CodegenContext < B > ,
1871
1869
coordinator_send : Sender < Message < B > > ,
1872
1870
llvm_start_time : & mut Option < VerboseTimingGuard < ' a > > ,
0 commit comments