Skip to content

Commit 2581e0d

Browse files
committed
Auto merge of #46193 - Zoxc:less-globals, r=<try>
WIP: Less globals This is based on #45912. r? @arielb1
2 parents cc6b88c + 057c727 commit 2581e0d

File tree

134 files changed

+3023
-2102
lines changed

Some content is hidden

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

134 files changed

+3023
-2102
lines changed

src/Cargo.lock

+184-103
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bootstrap/bin/rustc.rs

+4
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ fn main() {
262262
}
263263
}
264264

265+
if env::var_os("RUSTC_PARALLEL_QUERIES").is_some() {
266+
cmd.arg("--cfg").arg("parallel_queries");
267+
}
268+
265269
let color = match env::var("RUSTC_COLOR") {
266270
Ok(s) => usize::from_str(&s).expect("RUSTC_COLOR should be an integer"),
267271
Err(_) => 0,

src/bootstrap/compile.rs

+3
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,9 @@ pub fn rustc_cargo(build: &Build,
561561
if let Some(ref s) = build.config.rustc_default_linker {
562562
cargo.env("CFG_DEFAULT_LINKER", s);
563563
}
564+
if build.config.rustc_parallel_queries {
565+
cargo.env("RUSTC_PARALLEL_QUERIES", "1");
566+
}
564567
}
565568

566569
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]

src/bootstrap/config.rs

+3
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ pub struct Config {
8787
pub rust_debuginfo_lines: bool,
8888
pub rust_debuginfo_only_std: bool,
8989
pub rust_rpath: bool,
90+
pub rustc_parallel_queries: bool,
9091
pub rustc_default_linker: Option<String>,
9192
pub rust_optimize_tests: bool,
9293
pub rust_debuginfo_tests: bool,
@@ -264,6 +265,7 @@ struct Rust {
264265
debuginfo: Option<bool>,
265266
debuginfo_lines: Option<bool>,
266267
debuginfo_only_std: Option<bool>,
268+
experimental_parallel_queries: Option<bool>,
267269
debug_jemalloc: Option<bool>,
268270
use_jemalloc: Option<bool>,
269271
backtrace: Option<bool>,
@@ -470,6 +472,7 @@ impl Config {
470472
set(&mut config.rust_dist_src, rust.dist_src);
471473
set(&mut config.quiet_tests, rust.quiet_tests);
472474
set(&mut config.test_miri, rust.test_miri);
475+
config.rustc_parallel_queries = rust.experimental_parallel_queries.unwrap_or(false);
473476
config.rustc_default_linker = rust.default_linker.clone();
474477
config.musl_root = rust.musl_root.clone().map(PathBuf::from);
475478

src/libarena/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ version = "0.0.0"
77
name = "arena"
88
path = "lib.rs"
99
crate-type = ["dylib"]
10+
11+
[dependencies]
12+
rustc_data_structures = { path = "../librustc_data_structures" }

0 commit comments

Comments
 (0)