Skip to content

Commit 2c453de

Browse files
committed
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!
1 parent 9f57edf commit 2c453de

File tree

42 files changed

+445
-1045
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+445
-1045
lines changed

Diff for: compiler/rustc/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@ jemalloc = ['dep:jemalloc-sys']
3131
llvm = ['rustc_driver_impl/llvm']
3232
max_level_info = ['rustc_driver_impl/max_level_info']
3333
rustc_randomized_layouts = ['rustc_driver_impl/rustc_randomized_layouts']
34-
rustc_use_parallel_compiler = ['rustc_driver_impl/rustc_use_parallel_compiler']
3534
# tidy-alphabetical-end

Diff for: compiler/rustc_ast/src/tokenstream.rs

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ pub enum TokenTree {
3838
}
3939

4040
// Ensure all fields of `TokenTree` are `DynSend` and `DynSync`.
41-
#[cfg(parallel_compiler)]
4241
fn _dummy()
4342
where
4443
Token: sync::DynSend + sync::DynSync,

Diff for: compiler/rustc_baked_icu_data/Cargo.toml

+1-6
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ edition = "2021"
88
icu_list = "1.2"
99
icu_locid = "1.2"
1010
icu_locid_transform = "1.3.2"
11-
icu_provider = "1.2"
11+
icu_provider = { version = "1.2", features = ["sync"] }
1212
zerovec = "0.10.0"
1313
# tidy-alphabetical-end
14-
15-
[features]
16-
# tidy-alphabetical-start
17-
rustc_use_parallel_compiler = ['icu_provider/sync']
18-
# tidy-alphabetical-end

Diff for: compiler/rustc_data_structures/Cargo.toml

+2-7
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ bitflags = "2.4.1"
1010
either = "1.0"
1111
elsa = "=1.7.1"
1212
ena = "0.14.3"
13-
indexmap = { version = "2.4.0" }
13+
indexmap = { version = "2.4.0", features = ["rustc-rayon"] }
1414
jobserver_crate = { version = "0.1.28", package = "jobserver" }
1515
measureme = "11"
1616
rustc-hash = "2.0.0"
17-
rustc-rayon = { version = "0.5.0", optional = true }
17+
rustc-rayon = "0.5.0"
1818
rustc-stable-hash = { version = "0.1.0", features = ["nightly"] }
1919
rustc_arena = { path = "../rustc_arena" }
2020
rustc_graphviz = { path = "../rustc_graphviz" }
@@ -53,8 +53,3 @@ memmap2 = "0.2.1"
5353

5454
[target.'cfg(not(target_has_atomic = "64"))'.dependencies]
5555
portable-atomic = "1.5.1"
56-
57-
[features]
58-
# tidy-alphabetical-start
59-
rustc_use_parallel_compiler = ["indexmap/rustc-rayon", "dep:rustc-rayon"]
60-
# tidy-alphabetical-end

Diff for: compiler/rustc_data_structures/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#![allow(internal_features)]
1111
#![allow(rustc::default_hash_types)]
1212
#![allow(rustc::potential_query_instability)]
13-
#![cfg_attr(not(parallel_compiler), feature(cell_leak))]
1413
#![deny(unsafe_op_in_unsafe_fn)]
1514
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1615
#![doc(rust_logo)]

0 commit comments

Comments
 (0)