Skip to content

Commit 353599a

Browse files
authored
Rollup merge of #108865 - Zoxc:library-dummy-crate, r=jyn514
Add a `sysroot` crate to represent the standard library crates This adds a dummy crate named `sysroot` to represent the standard library target instead of using the `test` crate. This allows the removal of `proc_macro` as a dependency of `test` allowing these 2 crates to build in parallel saving around 9 seconds locally.
2 parents 91dfba3 + 4075e17 commit 353599a

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed

sysroot/Cargo.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[package]
2+
name = "sysroot"
3+
version = "0.0.0"
4+
edition = "2021"
5+
6+
# this is a dummy crate to ensure that all required crates appear in the sysroot
7+
[dependencies]
8+
proc_macro = { path = "../proc_macro" }
9+
std = { path = "../std" }
10+
test = { path = "../test" }
11+
12+
# Forward features to the `std` crate as necessary
13+
[features]
14+
default = ["std_detect_file_io", "std_detect_dlsym_getauxval", "panic-unwind"]
15+
backtrace = ["std/backtrace"]
16+
compiler-builtins-c = ["std/compiler-builtins-c"]
17+
compiler-builtins-mem = ["std/compiler-builtins-mem"]
18+
compiler-builtins-no-asm = ["std/compiler-builtins-no-asm"]
19+
compiler-builtins-mangled-names = ["std/compiler-builtins-mangled-names"]
20+
llvm-libunwind = ["std/llvm-libunwind"]
21+
system-llvm-libunwind = ["std/system-llvm-libunwind"]
22+
panic-unwind = ["std/panic_unwind"]
23+
panic_immediate_abort = ["std/panic_immediate_abort"]
24+
profiler = ["std/profiler"]
25+
std_detect_file_io = ["std/std_detect_file_io"]
26+
std_detect_dlsym_getauxval = ["std/std_detect_dlsym_getauxval"]
27+
std_detect_env_override = ["std/std_detect_env_override"]

sysroot/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// This is intentionally empty since this crate is only used to depend on other library crates.

test/Cargo.toml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,3 @@ std = { path = "../std" }
1212
core = { path = "../core" }
1313
panic_unwind = { path = "../panic_unwind" }
1414
panic_abort = { path = "../panic_abort" }
15-
16-
# not actually used but needed to always have proc_macro in the sysroot
17-
proc_macro = { path = "../proc_macro" }
18-
19-
# Forward features to the `std` crate as necessary
20-
[features]
21-
default = ["std_detect_file_io", "std_detect_dlsym_getauxval", "panic-unwind"]
22-
backtrace = ["std/backtrace"]
23-
compiler-builtins-c = ["std/compiler-builtins-c"]
24-
compiler-builtins-mem = ["std/compiler-builtins-mem"]
25-
compiler-builtins-no-asm = ["std/compiler-builtins-no-asm"]
26-
compiler-builtins-mangled-names = ["std/compiler-builtins-mangled-names"]
27-
llvm-libunwind = ["std/llvm-libunwind"]
28-
system-llvm-libunwind = ["std/system-llvm-libunwind"]
29-
panic-unwind = ["std/panic_unwind"]
30-
panic_immediate_abort = ["std/panic_immediate_abort"]
31-
profiler = ["std/profiler"]
32-
std_detect_file_io = ["std/std_detect_file_io"]
33-
std_detect_dlsym_getauxval = ["std/std_detect_dlsym_getauxval"]
34-
std_detect_env_override = ["std/std_detect_env_override"]

0 commit comments

Comments
 (0)