Skip to content

Commit 59fe28d

Browse files
committed
compiler-builtins: Clean up features
Remove the `compiler-builtins` feature from default because it prevents testing via the default `cargo test` command. It made more sense as a default when `compiler-builtins` was a dependency that some crates added via crates.io, but is no longer needed. The `rustc-dep-of-std` feature is also removed since it doesn't do anything beyond what the `compiler-builtins` feature already does.
1 parent cf7da0b commit 59fe28d

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

‎library/alloc/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bench = false
1616

1717
[dependencies]
1818
core = { path = "../core", public = true }
19-
compiler_builtins = { path = "../compiler-builtins/compiler-builtins", features = ["rustc-dep-of-std"] }
19+
compiler_builtins = { path = "../compiler-builtins/compiler-builtins", features = ["compiler-builtins"] }
2020

2121
[features]
2222
compiler-builtins-mem = ['compiler_builtins/mem']

‎library/compiler-builtins/builtins-shim/Cargo.toml‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ test = false
3939
cc = { version = "1.2", optional = true }
4040

4141
[features]
42-
default = ["compiler-builtins"]
42+
default = []
4343

4444
# Enable compilation of C code in compiler-rt, filling in some more optimized
4545
# implementations and also filling in unimplemented intrinsics
@@ -50,7 +50,8 @@ c = ["dep:cc"]
5050
# the generic versions on all platforms.
5151
no-asm = []
5252

53-
# Flag this library as the unstable compiler-builtins lib
53+
# Flag this library as the unstable compiler-builtins lib. This must be enabled
54+
# when using as `std`'s dependency.'
5455
compiler-builtins = []
5556

5657
# Generate memory-related intrinsics like memcpy
@@ -60,9 +61,6 @@ mem = []
6061
# compiler-rt implementations. Also used for testing
6162
mangled-names = []
6263

63-
# Only used in the compiler's build system
64-
rustc-dep-of-std = ["compiler-builtins"]
65-
6664
# This makes certain traits and function specializations public that
6765
# are not normally public but are required by the `builtins-test`
6866
unstable-public-internals = []

‎library/compiler-builtins/compiler-builtins/Cargo.toml‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ core = { path = "../../core", optional = true }
3434
cc = { version = "1.2", optional = true }
3535

3636
[features]
37-
default = ["compiler-builtins"]
37+
default = []
3838

3939
# Enable compilation of C code in compiler-rt, filling in some more optimized
4040
# implementations and also filling in unimplemented intrinsics
@@ -45,8 +45,9 @@ c = ["dep:cc"]
4545
# the generic versions on all platforms.
4646
no-asm = []
4747

48-
# Flag this library as the unstable compiler-builtins lib
49-
compiler-builtins = []
48+
# Flag this library as the unstable compiler-builtins lib. This must be enabled
49+
# when using as `std`'s dependency.'
50+
compiler-builtins = ["dep:core"]
5051

5152
# Generate memory-related intrinsics like memcpy
5253
mem = []
@@ -55,9 +56,6 @@ mem = []
5556
# compiler-rt implementations. Also used for testing
5657
mangled-names = []
5758

58-
# Only used in the compiler's build system
59-
rustc-dep-of-std = ["compiler-builtins", "dep:core"]
60-
6159
# This makes certain traits and function specializations public that
6260
# are not normally public but are required by the `builtins-test`
6361
unstable-public-internals = []

0 commit comments

Comments
 (0)