Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"

Expand Down
8 changes: 7 additions & 1 deletion builtins-test-intrinsics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 0 additions & 4 deletions builtins-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ authors = ["Alex Crichton <[email protected]>"]
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.
Expand Down
9 changes: 6 additions & 3 deletions ci/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion compiler-builtins/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down