Skip to content

Commit f7f3c19

Browse files
heihertgross35
authored andcommitted
Skip the f16-related tests on LoongArch
Skip the f16-related tests on LoongArch if there are no f16 symbols in the system libraries.
1 parent 657512b commit f7f3c19

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

testcrate/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ fn main() {
7575
|| target.arch == "powerpc"
7676
|| target.arch == "powerpc64"
7777
|| target.arch == "powerpc64le"
78+
|| target.arch == "loongarch64"
7879
|| (target.arch == "x86" && !target.has_feature("sse"))
7980
|| target.os == "windows"
8081
// Linking says "error: function signature mismatch: __extendhfsf2" and seems to

testcrate/tests/conv.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,11 @@ mod extend {
306306
}
307307

308308
#[cfg(all(f16_enabled, f128_enabled))]
309-
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
309+
#[cfg(not(any(
310+
target_arch = "powerpc",
311+
target_arch = "powerpc64",
312+
target_arch = "loongarch64"
313+
)))]
310314
f_to_f! {
311315
extend,
312316
f16 => f32, Half => Single, __extendhfsf2, not(feature = "no-sys-f16");
@@ -336,7 +340,11 @@ mod trunc {
336340
}
337341

338342
#[cfg(all(f16_enabled, f128_enabled))]
339-
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
343+
#[cfg(not(any(
344+
target_arch = "powerpc",
345+
target_arch = "powerpc64",
346+
target_arch = "loongarch64"
347+
)))]
340348
f_to_f! {
341349
trunc,
342350
f32 => f16, Single => Half, __truncsfhf2, not(feature = "no-sys-f16");

0 commit comments

Comments
 (0)