Skip to content

Communicate over stderr jobserver token acquiring/releasing #67398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Stop depending on rustc_jobserver::Client
  • Loading branch information
Mark-Simulacrum committed Feb 14, 2020
commit 2adb4186fe0640b975bc54e835b5cdc543a8c99c
6 changes: 2 additions & 4 deletions src/librustc_codegen_ssa/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};
use rustc_incremental::{
copy_cgu_workproducts_to_incr_comp_cache_dir, in_incr_comp_dir, in_incr_comp_dir_sess,
};
use rustc_jobserver::{Acquired, Client};
use rustc_jobserver::Acquired;
use rustc_session::cgu_reuse_tracker::CguReuseTracker;
use rustc_span::hygiene::ExpnId;
use rustc_span::source_map::SourceMap;
Expand Down Expand Up @@ -452,7 +452,6 @@ pub fn start_async_codegen<B: ExtraBackendMethods>(
codegen_worker_send,
coordinator_receive,
total_cgus,
rustc_jobserver::client(),
Arc::new(modules_config),
Arc::new(metadata_config),
Arc::new(allocator_config),
Expand Down Expand Up @@ -952,7 +951,6 @@ fn start_executing_work<B: ExtraBackendMethods>(
codegen_worker_send: Sender<Message<B>>,
coordinator_receive: Receiver<Box<dyn Any + Send>>,
total_cgus: usize,
jobserver: Client,
modules_config: Arc<ModuleConfig>,
metadata_config: Arc<ModuleConfig>,
allocator_config: Arc<ModuleConfig>,
Expand Down Expand Up @@ -996,7 +994,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
// get tokens on `coordinator_receive` which will
// get managed in the main loop below.
let coordinator_send2 = coordinator_send.clone();
let helper = jobserver
let helper = rustc_jobserver::client()
.into_helper_thread(move |token| {
let token = token.expect("acquired token successfully");
drop(coordinator_send2.send(Box::new(Message::Token::<B>(token))));
Expand Down