Skip to content

Commit d249043

Browse files
committed
Remove the entry point triggering -Zjobserver-per-rustc
1 parent c520386 commit d249043

File tree

3 files changed

+1
-34
lines changed

3 files changed

+1
-34
lines changed

src/cargo/core/compiler/context/mod.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ pub struct Context<'a, 'cfg> {
7171
/// metadata files in addition to the rlib itself.
7272
rmeta_required: HashSet<Unit>,
7373

74-
/// When we're in jobserver-per-rustc process mode, this keeps those
75-
/// jobserver clients for each Unit (which eventually becomes a rustc
76-
/// process).
77-
pub rustc_clients: HashMap<Unit, Client>,
78-
7974
/// Map of the LTO-status of each unit. This indicates what sort of
8075
/// compilation is happening (only object, only bitcode, both, etc), and is
8176
/// precalculated early on.
@@ -124,7 +119,6 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
124119
primary_packages: HashSet::new(),
125120
files: None,
126121
rmeta_required: HashSet::new(),
127-
rustc_clients: HashMap::new(),
128122
lto: HashMap::new(),
129123
metadata_for_doc_units: HashMap::new(),
130124
failed_scrape_units: Arc::new(Mutex::new(HashSet::new())),
@@ -614,24 +608,6 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
614608
self.rmeta_required.contains(unit)
615609
}
616610

617-
/// Used by `-Zjobserver-per-rustc`.
618-
pub fn new_jobserver(&mut self) -> CargoResult<Client> {
619-
let tokens = self.bcx.jobs() as usize;
620-
let client = Client::new(tokens).with_context(|| "failed to create jobserver")?;
621-
622-
// Drain the client fully
623-
for i in 0..tokens {
624-
client.acquire_raw().with_context(|| {
625-
format!(
626-
"failed to fully drain {}/{} token from jobserver at startup",
627-
i, tokens,
628-
)
629-
})?;
630-
}
631-
632-
Ok(client)
633-
}
634-
635611
/// Finds metadata for Doc/Docscrape units.
636612
///
637613
/// rustdoc needs a -Cmetadata flag in order to recognize StableCrateIds that refer to

src/cargo/core/compiler/mod.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -715,14 +715,7 @@ fn prepare_rustc(
715715
base.env("CARGO_TARGET_TMPDIR", tmp.display().to_string());
716716
}
717717

718-
if cx.bcx.config.cli_unstable().jobserver_per_rustc {
719-
let client = cx.new_jobserver()?;
720-
base.inherit_jobserver(&client);
721-
base.arg("-Z").arg("jobserver-token-requests");
722-
assert!(cx.rustc_clients.insert(unit.clone(), client).is_none());
723-
} else {
724-
base.inherit_jobserver(&cx.jobserver);
725-
}
718+
base.inherit_jobserver(&cx.jobserver);
726719
build_base_args(cx, &mut base, unit, crate_types)?;
727720
build_deps_args(&mut base, cx, unit)?;
728721
Ok(base)

src/cargo/core/features.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,6 @@ unstable_cli_options!(
716716
doctest_xcompile: bool = ("Compile and run doctests for non-host target using runner config"),
717717
dual_proc_macros: bool = ("Build proc-macros for both the host and the target"),
718718
features: Option<Vec<String>> = (HIDDEN),
719-
jobserver_per_rustc: bool = (HIDDEN),
720719
minimal_versions: bool = ("Resolve minimal dependency versions instead of maximum"),
721720
mtime_on_use: bool = ("Configure Cargo to update the mtime of used files"),
722721
no_index_update: bool = ("Do not update the registry index even if the cache is outdated"),
@@ -966,7 +965,6 @@ impl CliUnstable {
966965
"doctest-xcompile" => self.doctest_xcompile = parse_empty(k, v)?,
967966
"doctest-in-workspace" => self.doctest_in_workspace = parse_empty(k, v)?,
968967
"panic-abort-tests" => self.panic_abort_tests = parse_empty(k, v)?,
969-
"jobserver-per-rustc" => self.jobserver_per_rustc = parse_empty(k, v)?,
970968
"host-config" => self.host_config = parse_empty(k, v)?,
971969
"target-applies-to-host" => self.target_applies_to_host = parse_empty(k, v)?,
972970
"publish-timeout" => self.publish_timeout = parse_empty(k, v)?,

0 commit comments

Comments
 (0)