Skip to content

Commit 8c1b49d

Browse files
committed
Use public-dependencies in all sysroot crates
In [1], most dependencies of `std` and other sysroot crates were marked private, but this did not happen for `alloc` and `test`. Update these here, marking public standard library crates as the only non-private dependencies. [1]: rust-lang#111076
1 parent cb1d076 commit 8c1b49d

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

compiler/rustc_codegen_cranelift/patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ index 7165c3e48af..968552ad435 100644
1515
edition = "2021"
1616

1717
[dependencies]
18-
core = { path = "../core" }
18+
core = { path = "../core", public = true }
1919
-compiler_builtins = { version = "=0.1.146", features = ['rustc-dep-of-std'] }
2020
+compiler_builtins = { version = "=0.1.146", features = ['rustc-dep-of-std', 'no-f16-f128'] }
2121

library/alloc/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
cargo-features = ["public-dependency"]
2+
13
[package]
24
name = "alloc"
35
version = "0.0.0"
@@ -9,7 +11,7 @@ autobenches = false
911
edition = "2021"
1012

1113
[dependencies]
12-
core = { path = "../core" }
14+
core = { path = "../core", public = true }
1315
compiler_builtins = { version = "=0.1.146", features = ['rustc-dep-of-std'] }
1416

1517
[dev-dependencies]

library/sysroot/Cargo.toml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
cargo-features = ["public-dependency"]
2+
13
[package]
24
name = "sysroot"
35
version = "0.0.0"
46
edition = "2021"
57

68
# this is a dummy crate to ensure that all required crates appear in the sysroot
79
[dependencies]
8-
proc_macro = { path = "../proc_macro" }
10+
proc_macro = { path = "../proc_macro", public = true }
911
profiler_builtins = { path = "../profiler_builtins", optional = true }
10-
std = { path = "../std" }
11-
test = { path = "../test" }
12+
std = { path = "../std", public = true }
13+
test = { path = "../test", public = true }
1214

1315
# Forward features to the `std` crate as necessary
1416
[features]

library/test/Cargo.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
cargo-features = ["public-dependency"]
2+
13
[package]
24
name = "test"
35
version = "0.0.0"
46
edition = "2021"
57

68
[dependencies]
79
getopts = { version = "0.2.21", features = ['rustc-dep-of-std'] }
8-
std = { path = "../std" }
9-
core = { path = "../core" }
10+
std = { path = "../std", public = true }
11+
core = { path = "../core", public = true }
1012

1113
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]
1214
libc = { version = "0.2.150", default-features = false }

0 commit comments

Comments
 (0)