Skip to content

Commit efbf8ed

Browse files
feat: added x86_64-unknown-linux-gnu to the test matrix of
`intrinsic-test`
1 parent ce179da commit efbf8ed

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ jobs:
260260
- aarch64_be-unknown-linux-gnu
261261
- armv7-unknown-linux-gnueabihf
262262
- arm-unknown-linux-gnueabihf
263+
- x86_64-unknown-linux-gnu
263264
profile: [dev, release]
264265
include:
265266
- target: aarch64_be-unknown-linux-gnu

ci/intrinsic-test.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ case ${TARGET} in
6666
TEST_CXX_COMPILER="clang++"
6767
TEST_RUNNER="${CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER}"
6868
;;
69+
x86_64-unknown-linux-gnu*)
70+
TEST_CPPFLAGS="-fuse-ld=lld -I/usr/include/x86_64-linux-gnu/"
71+
TEST_SKIP_INTRINSICS=crates/intrinsic-test/missing_X86.txt
72+
TEST_CXX_COMPILER="clang++-19"
73+
TEST_RUNNER="${CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER}"
74+
TEST_SAMPLE_INTRINSICS_PERCENTAGE=5
6975
*)
7076
;;
7177

@@ -94,6 +100,21 @@ case "${TARGET}" in
94100
--linker "${CARGO_TARGET_AARCH64_BE_UNKNOWN_LINUX_GNU_LINKER}" \
95101
--cxx-toolchain-dir "${AARCH64_BE_TOOLCHAIN}"
96102
;;
103+
x86_64-unknown-linux-gnu*)
104+
# `CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER` is not necessary for `intrinsic-test`
105+
# because the binary needs to run directly on the host.
106+
# Hence the use of `env -u`.
107+
env -u CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER \
108+
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" \
109+
RUST_LOG=warn RUST_BACKTRACE=1 \
110+
cargo run "${INTRINSIC_TEST}" "${PROFILE}" \
111+
--bin intrinsic-test -- intrinsics_data/x86-intel.xml \
112+
--runner "${TEST_RUNNER}" \
113+
--skip "${TEST_SKIP_INTRINSICS}" \
114+
--cppcompiler "${TEST_CXX_COMPILER}" \
115+
--target "${TARGET}" \
116+
--sample-percentage "${TEST_SAMPLE_INTRINSICS_PERCENTAGE}"
117+
;;
97118
*)
98119
;;
99120
esac

0 commit comments

Comments
 (0)