diff options
| author | Noratrieb <48135649+Noratrieb@users.noreply.github.com> | 2024-10-28 18:51:12 +0100 | 
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2024-11-12 13:38:58 +0000 | 
| commit | 505b8e133282a5ced49d8b9c6c5678b8030123a4 (patch) | |
| tree | 0b78d0a358d7ca2325cb3f0edb0d6a6884397fa0 /compiler/rustc_interface/src/util.rs | |
| parent | 00ed73cdc09a6452cb58202d56a9211fb3c73031 (diff) | |
| download | rust-505b8e133282a5ced49d8b9c6c5678b8030123a4.tar.gz rust-505b8e133282a5ced49d8b9c6c5678b8030123a4.zip | |
Delete the `cfg(not(parallel))` serial compiler
Since it's inception a long time ago, the parallel compiler and its cfgs have been a maintenance burden. This was a necessary evil the allow iteration while not degrading performance because of synchronization overhead. But this time is over. Thanks to the amazing work by the parallel working group (and the dyn sync crimes), the parallel compiler has now been fast enough to be shipped by default in nightly for quite a while now. Stable and beta have still been on the serial compiler, because they can't use `-Zthreads` anyways. But this is quite suboptimal: - the maintenance burden still sucks - we're not testing the serial compiler in nightly Because of these reasons, it's time to end it. The serial compiler has served us well in the years since it was split from the parallel one, but it's over now. Let the knight slay one head of the two-headed dragon!
Diffstat (limited to 'compiler/rustc_interface/src/util.rs')
| -rw-r--r-- | compiler/rustc_interface/src/util.rs | 14 | 
1 files changed, 0 insertions, 14 deletions
| diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index 71e8accf5a3..266d2e5e8bc 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -6,7 +6,6 @@ use std::{env, iter, thread}; use rustc_ast as ast; use rustc_codegen_ssa::traits::CodegenBackend; -#[cfg(parallel_compiler)] use rustc_data_structures::sync; use rustc_metadata::{DylibError, load_symbol_from_dylib}; use rustc_middle::ty::CurrentGcx; @@ -117,19 +116,6 @@ fn run_in_thread_with_globals<F: FnOnce(CurrentGcx) -> R + Send, R: Send>( }) } -#[cfg(not(parallel_compiler))] -pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce(CurrentGcx) -> R + Send, R: Send>( - thread_builder_diag: &EarlyDiagCtxt, - edition: Edition, - _threads: usize, - sm_inputs: SourceMapInputs, - f: F, -) -> R { - let thread_stack_size = init_stack_size(thread_builder_diag); - run_in_thread_with_globals(thread_stack_size, edition, sm_inputs, f) -} - -#[cfg(parallel_compiler)] pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce(CurrentGcx) -> R + Send, R: Send>( thread_builder_diag: &EarlyDiagCtxt, edition: Edition, | 
