File tree Expand file tree Collapse file tree 5 files changed +21
-17
lines changed
Expand file tree Collapse file tree 5 files changed +21
-17
lines changed Original file line number Diff line number Diff line change 11[workspace ]
22resolver = " 3"
33members = [
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 ]
2831panic = " abort"
2932
Original file line number Diff line number Diff line change 55edition = " 2024"
66publish = 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.
Original file line number Diff line number Diff line change @@ -19,9 +19,12 @@ run() {
1919 echo " target is emulated"
2020 fi
2121
22- # This directory needs to exist before calling docker, otherwise docker will create it but it
23- # will be owned by root
22+ # Directories and files that do not yet exist need to be created before
23+ # calling docker, otherwise docker will create them but they will be owned
24+ # by root.
2425 mkdir -p target
26+ touch Cargo.lock
27+ touch builtins-test-intrinsics/Cargo.toml
2528
2629 run_cmd=" HOME=/tmp"
2730
@@ -53,7 +56,8 @@ run() {
5356 # Use rustc provided by a docker image
5457 docker volume create compiler-builtins-cache
5558 build_args=(
56- " --build-arg" " IMAGE=${DOCKER_BASE_IMAGE:- rustlang/ rust: nightly} "
59+ " --build-arg"
60+ " IMAGE=${DOCKER_BASE_IMAGE:- rustlang/ rust: nightly} "
5761 )
5862 run_args=(-v " compiler-builtins-cache:/builtins-target" )
5963 run_cmd=" $run_cmd HOME=/tmp" " USING_CONTAINER_RUSTC=1"
Original file line number Diff line number Diff line change 122122rm -f " ${rlib_paths[@]} "
123123
124124build_intrinsics_test () {
125- cargo build --target " $target " -v --package builtins-test-intrinsics " $@ "
125+ cargo build \
126+ --target " $target " --verbose \
127+ --manifest-path builtins-test-intrinsics/Cargo.toml " $@ "
126128}
127129
128130# Verify that we haven't dropped any intrinsics/symbols
@@ -133,10 +135,8 @@ build_intrinsics_test --features c --release
133135
134136# Verify that there are no undefined symbols to `panic` within our
135137# 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
138+ CARGO_PROFILE_DEV_LTO=true build_intrinsics_test
139+ CARGO_PROFILE_RELEASE_LTO=true build_intrinsics_test --release
140140
141141# Ensure no references to any symbols from core
142142update_rlib_paths
Original file line number Diff line number Diff line change @@ -25,8 +25,9 @@ include = [
2525links = ' compiler-rt'
2626
2727[lib ]
28- test = false
2928bench = false
29+ doctest = false
30+ test = false
3031
3132[dependencies ]
3233# For more information on this dependency see
You can’t perform that action at this time.
0 commit comments