Skip to content

Commit afc4837

Browse files
committed
Move builtins-test-intrinsics out of the workspace
This crate doesn't need to be a default member since it requires the opposite settings from everything else. Exclude it from the workspace and run it only when explicitly requested. This also makes `cargo t --no-default-features` work without additional qualifiers. `--no-default-features` still needs to be passed to disable `compiler-builtins`.
1 parent adcb811 commit afc4837

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

Cargo.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
[workspace]
22
resolver = "3"
33
members = [
4-
# Note that builtins-test-intrinsics cannot be a default member because it
5-
# needs the `mangled-names` feature disabled, while `builtins-test` needs
6-
# it enabled.
74
"builtins-test",
8-
"builtins-test-intrinsics",
95
"compiler-builtins",
106
"crates/libm-macros",
117
"libm",
@@ -24,6 +20,13 @@ default-members = [
2420
"libm",
2521
]
2622

23+
exclude = [
24+
# `builtins-test-intrinsics` needs the feature `compiler-builtins` enabled
25+
# and `mangled-names` disabled, which is the opposite of what is needed for
26+
# other tests, so it makes sense to keep it out of the workspace.
27+
"builtins-test-intrinsics",
28+
]
29+
2730
[profile.release]
2831
panic = "abort"
2932

builtins-test/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ authors = ["Alex Crichton <[email protected]>"]
55
edition = "2024"
66
publish = false
77

8-
[lib]
9-
test = false
10-
doctest = false
11-
128
[dependencies]
139
# For fuzzing tests we want a deterministic seedable RNG. We also eliminate potential
1410
# problems with system RNGs on the variety of platforms this crate is tested on.

ci/run.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ done
122122
rm -f "${rlib_paths[@]}"
123123

124124
build_intrinsics_test() {
125-
cargo build --target "$target" -v --package builtins-test-intrinsics "$@"
125+
cargo build \
126+
--target "$target" \
127+
--verbose \
128+
--manifest-path crates/builtins-test-intrinsics/Cargo.toml \
129+
"$@"
126130
}
127131

128132
# Verify that we haven't dropped any intrinsics/symbols
@@ -133,10 +137,8 @@ build_intrinsics_test --features c --release
133137

134138
# Verify that there are no undefined symbols to `panic` within our
135139
# implementations
136-
CARGO_PROFILE_DEV_LTO=true \
137-
cargo build --target "$target" --package builtins-test-intrinsics
138-
CARGO_PROFILE_RELEASE_LTO=true \
139-
cargo build --target "$target" --package builtins-test-intrinsics --release
140+
CARGO_PROFILE_DEV_LTO=true build_intrinsics_test
141+
CARGO_PROFILE_RELEASE_LTO=true build_intrinsics_test --release
140142

141143
# Ensure no references to any symbols from core
142144
update_rlib_paths

compiler-builtins/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ include = [
2525
links = 'compiler-rt'
2626

2727
[lib]
28-
test = false
2928
bench = false
29+
doctest = false
30+
test = false
3031

3132
[dependencies]
3233
# For more information on this dependency see

0 commit comments

Comments
 (0)