Skip to content

Commit f438fb2

Browse files
committed
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 c7002c3 commit f438fb2

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
@@ -57,6 +57,7 @@ fn main() {
5757
|| target.arch == "powerpc"
5858
|| target.arch == "powerpc64"
5959
|| target.arch == "powerpc64le"
60+
|| target.arch == "loongarch64"
6061
|| (target.arch == "x86" && !target.has_feature("sse"))
6162
|| target.os == "windows"
6263
// 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");
@@ -335,7 +339,11 @@ mod trunc {
335339
}
336340

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

0 commit comments

Comments
 (0)