Skip to content

Commit fc8f8b5

Browse files
committed
working
1 parent e949d8b commit fc8f8b5

File tree

1 file changed

+3
-5
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+3
-5
lines changed

compiler/rustc_codegen_ssa/src/back/write.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,6 @@ fn start_executing_work<B: ExtraBackendMethods>(
12951295
// Each LLVM module is automatically sent back to the coordinator for LTO if
12961296
// necessary. There's already optimizations in place to avoid sending work
12971297
// back to the coordinator if LTO isn't requested.
1298-
let sysroot = sess.opts.sysroot.clone();
12991298
return B::spawn_named_thread(cgcx.time_trace, "coordinator".to_string(), move || {
13001299
// This is where we collect codegen units that have gone all the way
13011300
// through codegen and LLVM.
@@ -1375,7 +1374,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
13751374
let (item, _) =
13761375
work_items.pop().expect("queue empty - queue_full_enough() broken?");
13771376
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);
13791378
}
13801379
}
13811380
} else if codegen_state == Completed {
@@ -1448,7 +1447,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
14481447
MainThreadState::Idle => {
14491448
if let Some((item, _)) = work_items.pop() {
14501449
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);
14521451
} else {
14531452
// There is no unstarted work, so let the main thread
14541453
// take over for a running worker. Otherwise the
@@ -1484,7 +1483,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
14841483
while running_with_own_token < tokens.len()
14851484
&& let Some((item, _)) = work_items.pop()
14861485
{
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);
14881487
running_with_own_token += 1;
14891488
}
14901489
}
@@ -1866,7 +1865,6 @@ unsafe impl Send for EnzymeWrapper {}
18661865
}
18671866

18681867
fn spawn_work<'a, B: ExtraBackendMethods>(
1869-
sysroot: Sysroot,
18701868
cgcx: &'a CodegenContext<B>,
18711869
coordinator_send: Sender<Message<B>>,
18721870
llvm_start_time: &mut Option<VerboseTimingGuard<'a>>,

0 commit comments

Comments
 (0)