Rollup merge of #84777 - jyn514:rustdoc-parallel, r=Mark-Simulacrum
Apply `--cfg parallel_compiler` when documenting
This also reverts commit 9823c2cc70
working around the bug.
Fixes https://github.com/rust-lang/rust/issues/82301.
This commit is contained in:
commit
5fc898782c
3 changed files with 6 additions and 6 deletions
|
@ -232,6 +232,7 @@ macro_rules! define_callbacks {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait QueryEngine<'tcx>: rustc_data_structures::sync::Sync {
|
pub trait QueryEngine<'tcx>: rustc_data_structures::sync::Sync {
|
||||||
|
#[cfg(parallel_compiler)]
|
||||||
unsafe fn deadlock(&'tcx self, tcx: TyCtxt<'tcx>, registry: &rustc_rayon_core::Registry);
|
unsafe fn deadlock(&'tcx self, tcx: TyCtxt<'tcx>, registry: &rustc_rayon_core::Registry);
|
||||||
|
|
||||||
fn encode_query_results(
|
fn encode_query_results(
|
||||||
|
|
|
@ -550,12 +550,10 @@ macro_rules! define_queries_struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl QueryEngine<'tcx> for Queries<'tcx> {
|
impl QueryEngine<'tcx> for Queries<'tcx> {
|
||||||
unsafe fn deadlock(&'tcx self, _tcx: TyCtxt<'tcx>, _registry: &rustc_rayon_core::Registry) {
|
#[cfg(parallel_compiler)]
|
||||||
#[cfg(parallel_compiler)]
|
unsafe fn deadlock(&'tcx self, tcx: TyCtxt<'tcx>, registry: &rustc_rayon_core::Registry) {
|
||||||
{
|
let tcx = QueryCtxt { tcx, queries: self };
|
||||||
let tcx = QueryCtxt { tcx: _tcx, queries: self };
|
rustc_query_system::query::deadlock(tcx, registry)
|
||||||
rustc_query_system::query::deadlock(tcx, _registry)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn encode_query_results(
|
fn encode_query_results(
|
||||||
|
|
|
@ -648,6 +648,7 @@ pub fn rustc_cargo_env(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetS
|
||||||
}
|
}
|
||||||
if builder.config.rustc_parallel {
|
if builder.config.rustc_parallel {
|
||||||
cargo.rustflag("--cfg=parallel_compiler");
|
cargo.rustflag("--cfg=parallel_compiler");
|
||||||
|
cargo.rustdocflag("--cfg=parallel_compiler");
|
||||||
}
|
}
|
||||||
if builder.config.rust_verify_llvm_ir {
|
if builder.config.rust_verify_llvm_ir {
|
||||||
cargo.env("RUSTC_VERIFY_LLVM_IR", "1");
|
cargo.env("RUSTC_VERIFY_LLVM_IR", "1");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue