mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
0a5785734c
Emscripten and OpenBSD exit out of the build script early. Since
02014b06c1a3 ("c-b: Turn `mem-unaligned` from a feature to a cfg"), this
meant that the exit happened before all `rustc-check-cfg`s had been
emitted.
Rework the logic so these only skip the C build rather than the rest of
configuration.
24 lines
683 B
Bash
Executable File
24 lines
683 B
Bash
Executable File
#!/bin/bash
|
|
set -eux
|
|
|
|
# We need Tree Borrows as some of our raw pointer patterns are not
|
|
# compatible with Stacked Borrows.
|
|
export MIRIFLAGS="-Zmiri-tree-borrows"
|
|
|
|
# One target that sets `mem_unaligned` and one that does not,
|
|
# and a big-endian target.
|
|
targets=(
|
|
x86_64-unknown-linux-gnu
|
|
armv7-unknown-linux-gnueabihf
|
|
s390x-unknown-linux-gnu
|
|
)
|
|
for target in "${targets[@]}"; do
|
|
# Only run the `mem` tests to avoid this taking too long. Disable default
|
|
# features to turn off `arch` and avoid inline assembly.
|
|
cargo miri test \
|
|
--manifest-path builtins-test/Cargo.toml \
|
|
--no-default-features \
|
|
--target "$target" \
|
|
-- mem
|
|
done
|