|
| 1 | +# A script to run cargo check for fearless_simd on each supported platform. |
| 2 | +# We currently don't run this in CI, as we expect it would take too long. |
| 3 | +# Before using, you must run: |
| 4 | +# rustup target add aarch64-linux-android x86_64-unknown-linux-gnu i686-pc-windows-msvc wasm32-unknown-unknown riscv64gc-unknown-linux-gnu |
| 5 | + |
| 6 | +# Run using `sh ./check_targets.sh` |
| 7 | +# TODO: Make into an xtask like thing so that windows users can use easily. |
| 8 | + |
| 9 | +# aarch64, both with and without neon support. |
| 10 | +# Note that doing `-neon` is not sound due to the standard library's ABI, but the |
| 11 | +# binary is never executed (nor indeed is it even created), and it's still a useful sanity check. |
| 12 | +RUSTFLAGS=-Ctarget-feature=-neon cargo check -p fearless_simd --target aarch64-linux-android |
| 13 | +RUSTFLAGS=-Ctarget-feature=-neon cargo check -p fearless_simd --target aarch64-linux-android --features force_support_fallback |
| 14 | +cargo check -p fearless_simd --target aarch64-linux-android --features force_support_fallback |
| 15 | +cargo check -p fearless_simd --target aarch64-linux-android |
| 16 | + |
| 17 | +# x86_64, at all supported static SIMD levels. |
| 18 | +RUSTFLAGS=-Ctarget-feature=+avx2,+fma cargo check -p fearless_simd --target x86_64-unknown-linux-gnu |
| 19 | +RUSTFLAGS=-Ctarget-feature=+avx2,+fma cargo check -p fearless_simd --target x86_64-unknown-linux-gnu --features force_support_fallback |
| 20 | +RUSTFLAGS=-Ctarget-feature=+sse4.2 cargo check -p fearless_simd --target x86_64-unknown-linux-gnu |
| 21 | +RUSTFLAGS=-Ctarget-feature=+sse4.2 cargo check -p fearless_simd --target x86_64-unknown-linux-gnu --features force_support_fallback |
| 22 | +cargo check -p fearless_simd --target x86_64-unknown-linux-gnu |
| 23 | +cargo check -p fearless_simd --target x86_64-unknown-linux-gnu --features force_support_fallback |
| 24 | + |
| 25 | +# x86 (i.e. 32 bit) at all supported static SIMD levels. |
| 26 | +RUSTFLAGS=-Ctarget-feature=+avx2,+fma cargo check -p fearless_simd --target i686-pc-windows-msvc |
| 27 | +RUSTFLAGS=-Ctarget-feature=+avx2,+fma cargo check -p fearless_simd --target i686-pc-windows-msvc --features force_support_fallback |
| 28 | +RUSTFLAGS=-Ctarget-feature=+sse4.2 cargo check -p fearless_simd --target i686-pc-windows-msvc |
| 29 | +RUSTFLAGS=-Ctarget-feature=+sse4.2 cargo check -p fearless_simd --target i686-pc-windows-msvc --features force_support_fallback |
| 30 | +cargo check -p fearless_simd --target i686-pc-windows-msvc |
| 31 | +cargo check -p fearless_simd --target i686-pc-windows-msvc --features force_support_fallback |
| 32 | + |
| 33 | +# Wasm, both with and without SIMD. |
| 34 | +cargo check -p fearless_simd --target wasm32-unknown-unknown |
| 35 | +cargo check -p fearless_simd --target wasm32-unknown-unknown --features force_support_fallback |
| 36 | +RUSTFLAGS=-Ctarget-feature=+simd128 cargo check -p fearless_simd --target wasm32-unknown-unknown |
| 37 | +RUSTFLAGS=-Ctarget-feature=+simd128 cargo check -p fearless_simd --target wasm32-unknown-unknown --features force_support_fallback |
| 38 | + |
| 39 | +# riscv64, which is importantly a target we don't support any SIMD levels for. |
| 40 | +cargo check -p fearless_simd --target riscv64gc-unknown-linux-gnu |
| 41 | +cargo check -p fearless_simd --target riscv64gc-unknown-linux-gnu --features force_support_fallback |
0 commit comments