Skip to content

Commit

Permalink
Auto merge of #7848 - ehuss:beta-revert-jobserver, r=alexcrichton
Browse files Browse the repository at this point in the history
[beta] Revert scalable jobserver.

This reverts #7731, #7829, and #7836.

This should prevent #7840 on beta. I feel more comfortable reverting this than merging #7844, since the impact is still unknown.
  • Loading branch information
bors committed Jan 31, 2020
2 parents 9d32b7b + 77d6a52 commit 8633429
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 510 deletions.
23 changes: 0 additions & 23 deletions src/cargo/core/compiler/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ pub struct Context<'a, 'cfg> {
/// metadata files in addition to the rlib itself. This is only filled in
/// when `pipelining` above is enabled.
rmeta_required: HashSet<Unit<'a>>,

/// When we're in jobserver-per-rustc process mode, this keeps those
/// jobserver clients for each Unit (which eventually becomes a rustc
/// process).
pub rustc_clients: HashMap<Unit<'a>, Client>,
}

impl<'a, 'cfg> Context<'a, 'cfg> {
Expand Down Expand Up @@ -117,7 +112,6 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
unit_dependencies,
files: None,
rmeta_required: HashSet::new(),
rustc_clients: HashMap::new(),
pipelining,
})
}
Expand Down Expand Up @@ -497,21 +491,4 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
pub fn rmeta_required(&self, unit: &Unit<'a>) -> bool {
self.rmeta_required.contains(unit) || self.bcx.config.cli_unstable().timings.is_some()
}

pub fn new_jobserver(&mut self) -> CargoResult<Client> {
let tokens = self.bcx.build_config.jobs as usize;
let client = Client::new(tokens).chain_err(|| "failed to create jobserver")?;

// Drain the client fully
for i in 0..tokens {
client.acquire_raw().chain_err(|| {
format!(
"failed to fully drain {}/{} token from jobserver at startup",
i, tokens,
)
})?;
}

Ok(client)
}
}
Loading

0 comments on commit 8633429

Please sign in to comment.