Skip to content

Commit 4bb9355

Browse files
authored
Merge pull request #2224 from folkertdev/win-gnu-no-f16
only run `f16` tests when `target_has_reliable_f16`
2 parents 1c116d3 + 29a8fe8 commit 4bb9355

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

‎crates/core_arch/Cargo.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ stdarch-test = { version = "0.*", path = "../stdarch-test" }
2424
[target.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.dev-dependencies]
2525
syscalls = { version = "0.6.18", default-features = false }
2626

27+
[lints.rust]
28+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_has_reliable_f16)'] }
29+
2730
[lints.clippy]
2831
too_long_first_doc_paragraph = "allow"
2932
missing_transmute_annotations = "allow"

‎crates/core_arch/src/lib.rs‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,15 @@
4242
clflushopt_target_feature,
4343
min_adt_const_params
4444
)]
45-
#![cfg_attr(test, feature(test, abi_vectorcall, stdarch_internal))]
45+
#![cfg_attr(
46+
test,
47+
feature(
48+
test,
49+
abi_vectorcall,
50+
stdarch_internal,
51+
cfg_target_has_reliable_f16_f128
52+
)
53+
)]
4654
#![deny(clippy::missing_inline_in_public_items)]
4755
#![allow(
4856
clippy::identity_op,

‎crates/core_arch/src/x86/avx512fp16.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16837,6 +16837,7 @@ unsafe extern "llvm-intrinsic" {
1683716837
}
1683816838

1683916839
#[cfg(test)]
16840+
#[cfg(target_has_reliable_f16)]
1684016841
mod tests {
1684116842
use crate::core_arch::assert_eq_const as assert_eq;
1684216843
use crate::core_arch::x86::*;

‎crates/core_arch/src/x86_64/avx512fp16.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ unsafe extern "llvm-intrinsic" {
227227
}
228228

229229
#[cfg(test)]
230+
#[cfg(target_has_reliable_f16)]
230231
mod tests {
231232
use crate::core_arch::{x86::*, x86_64::*};
232233
use stdarch_test::simd_test;

0 commit comments

Comments
 (0)