about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/compiler-builtins/Cargo.toml11
-rw-r--r--library/compiler-builtins/builtins-test-intrinsics/Cargo.toml8
-rw-r--r--library/compiler-builtins/builtins-test/Cargo.toml4
-rwxr-xr-xlibrary/compiler-builtins/ci/run-docker.sh9
-rwxr-xr-xlibrary/compiler-builtins/ci/run.sh10
-rw-r--r--library/compiler-builtins/compiler-builtins/Cargo.toml3
6 files changed, 27 insertions, 18 deletions
diff --git a/library/compiler-builtins/Cargo.toml b/library/compiler-builtins/Cargo.toml
index 155fb00b195..feaeb97915b 100644
--- a/library/compiler-builtins/Cargo.toml
+++ b/library/compiler-builtins/Cargo.toml
@@ -1,11 +1,7 @@
 [workspace]
 resolver = "3"
 members = [
-    # Note that builtins-test-intrinsics cannot be a default member because it
-    # needs the `mangled-names` feature disabled, while `builtins-test` needs
-    # it enabled.
     "builtins-test",
-    "builtins-test-intrinsics",
     "compiler-builtins",
     "crates/libm-macros",
     "libm",
@@ -24,6 +20,13 @@ default-members = [
     "libm",
 ]
 
+exclude = [
+    # `builtins-test-intrinsics` needs the feature `compiler-builtins` enabled
+    # and `mangled-names` disabled, which is the opposite of what is needed for
+    # other tests, so it makes sense to keep it out of the workspace.
+    "builtins-test-intrinsics",
+]
+
 [profile.release]
 panic = "abort"
 
diff --git a/library/compiler-builtins/builtins-test-intrinsics/Cargo.toml b/library/compiler-builtins/builtins-test-intrinsics/Cargo.toml
index 9dbd3c32f96..6d88cbec90d 100644
--- a/library/compiler-builtins/builtins-test-intrinsics/Cargo.toml
+++ b/library/compiler-builtins/builtins-test-intrinsics/Cargo.toml
@@ -6,7 +6,13 @@ publish = false
 
 [dependencies]
 compiler_builtins = { path = "../compiler-builtins", features = ["compiler-builtins"]}
-panic-handler = { path = '../crates/panic-handler' }
+panic-handler = { path = "../crates/panic-handler" }
 
 [features]
 c = ["compiler_builtins/c"]
+
+[profile.release]
+panic = "abort"
+
+[profile.dev]
+panic = "abort"
diff --git a/library/compiler-builtins/builtins-test/Cargo.toml b/library/compiler-builtins/builtins-test/Cargo.toml
index 526e9b18af0..18185d8fe40 100644
--- a/library/compiler-builtins/builtins-test/Cargo.toml
+++ b/library/compiler-builtins/builtins-test/Cargo.toml
@@ -5,10 +5,6 @@ authors = ["Alex Crichton <alex@alexcrichton.com>"]
 edition = "2024"
 publish = false
 
-[lib]
-test = false
-doctest = false
-
 [dependencies]
 # For fuzzing tests we want a deterministic seedable RNG. We also eliminate potential
 # problems with system RNGs on the variety of platforms this crate is tested on.
diff --git a/library/compiler-builtins/ci/run-docker.sh b/library/compiler-builtins/ci/run-docker.sh
index 2c27ab7955b..d07e7784c9a 100755
--- a/library/compiler-builtins/ci/run-docker.sh
+++ b/library/compiler-builtins/ci/run-docker.sh
@@ -19,9 +19,11 @@ run() {
         echo "target is emulated"
     fi
 
-    # This directory needs to exist before calling docker, otherwise docker will create it but it
-    # will be owned by root
+    # Directories and files that do not yet exist need to be created before
+    # calling docker, otherwise docker will create them but they will be owned
+    # by root.
     mkdir -p target
+    cargo generate-lockfile --manifest-path builtins-test-intrinsics/Cargo.toml
 
     run_cmd="HOME=/tmp"
 
@@ -53,7 +55,8 @@ run() {
         # Use rustc provided by a docker image
         docker volume create compiler-builtins-cache
         build_args=(
-            "--build-arg" "IMAGE=${DOCKER_BASE_IMAGE:-rustlang/rust:nightly}"
+            "--build-arg"
+            "IMAGE=${DOCKER_BASE_IMAGE:-rustlang/rust:nightly}"
         )
         run_args=(-v "compiler-builtins-cache:/builtins-target")
         run_cmd="$run_cmd HOME=/tmp" "USING_CONTAINER_RUSTC=1"
diff --git a/library/compiler-builtins/ci/run.sh b/library/compiler-builtins/ci/run.sh
index 49cc1628652..96a6e92a9b9 100755
--- a/library/compiler-builtins/ci/run.sh
+++ b/library/compiler-builtins/ci/run.sh
@@ -122,7 +122,9 @@ done
 rm -f "${rlib_paths[@]}"
 
 build_intrinsics_test() {
-    cargo build --target "$target" -v --package builtins-test-intrinsics "$@"
+    cargo build \
+        --target "$target" --verbose \
+        --manifest-path builtins-test-intrinsics/Cargo.toml "$@"
 }
 
 # Verify that we haven't dropped any intrinsics/symbols
@@ -133,10 +135,8 @@ build_intrinsics_test --features c --release
 
 # Verify that there are no undefined symbols to `panic` within our
 # implementations
-CARGO_PROFILE_DEV_LTO=true \
-    cargo build --target "$target" --package builtins-test-intrinsics
-CARGO_PROFILE_RELEASE_LTO=true \
-    cargo build --target "$target" --package builtins-test-intrinsics --release
+CARGO_PROFILE_DEV_LTO=true build_intrinsics_test
+CARGO_PROFILE_RELEASE_LTO=true build_intrinsics_test --release
 
 # Ensure no references to any symbols from core
 update_rlib_paths
diff --git a/library/compiler-builtins/compiler-builtins/Cargo.toml b/library/compiler-builtins/compiler-builtins/Cargo.toml
index 3151546ab8d..c9503bbce8e 100644
--- a/library/compiler-builtins/compiler-builtins/Cargo.toml
+++ b/library/compiler-builtins/compiler-builtins/Cargo.toml
@@ -25,8 +25,9 @@ include = [
 links = 'compiler-rt'
 
 [lib]
-test = false
 bench = false
+doctest = false
+test = false
 
 [dependencies]
 # For more information on this dependency see