Skip to content

Commit e74a507

Browse files
committed
compiler-builtins: Clean up features
Remove the `compiler-builtins` 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 notable.
1 parent 733dab5 commit e74a507

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
@@ -31,7 +31,7 @@ test = false
3131
cc = { optional = true, version = "1.2" }
3232

3333
[features]
34-
default = ["compiler-builtins"]
34+
default = []
3535

3636
# Enable compilation of C code in compiler-rt, filling in some more optimized
3737
# implementations and also filling in unimplemented intrinsics
@@ -45,7 +45,8 @@ no-asm = []
4545
# `f128` support. Disabled any intrinsics which use those types.
4646
no-f16-f128 = []
4747

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

5152
# Generate memory-related intrinsics like memcpy
@@ -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"]
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 = []

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

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

3131
[features]
32-
default = ["compiler-builtins"]
32+
default = []
3333

3434
# Enable compilation of C code in compiler-rt, filling in some more optimized
3535
# implementations and also filling in unimplemented intrinsics
@@ -43,8 +43,9 @@ no-asm = []
4343
# `f128` support. Disabled any intrinsics which use those types.
4444
no-f16-f128 = []
4545

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

4950
# Generate memory-related intrinsics like memcpy
5051
mem = []
@@ -53,9 +54,6 @@ mem = []
5354
# compiler-rt implementations. Also used for testing
5455
mangled-names = []
5556

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

0 commit comments

Comments
 (0)