Skip to content

Commit f2de609

Browse files
committed
Update which platforms have no f16 symbols
Previously we were building the C versions of these symbols. Since we added the Rust version and updated compiler builtins, these are no longer available by default. This is unintentional, but it gives a better indicator of which symbol versions are not actually provided by the system. Use the list of build failures to correct the list of platforms that do not have `f16` symbols.
1 parent ce16d53 commit f2de609

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

testcrate/build.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,20 @@ fn main() {
4444
features.insert(Feature::NoSysF16F128Convert);
4545
}
4646

47-
if target.starts_with("wasm32-") {
47+
// These platforms do not have f16 symbols available in their system libraries, so
48+
// skip related tests. Most of these are missing `f16 <-> f32` conversion routines.
49+
if (target.starts_with("aarch64-") && target.contains("linux"))
50+
|| target.starts_with("arm")
51+
|| target.starts_with("powerpc-")
52+
|| target.starts_with("powerpc64-")
53+
|| target.starts_with("powerpc64le-")
54+
|| target.contains("windows-")
4855
// Linking says "error: function signature mismatch: __extendhfsf2" and seems to
4956
// think the signature is either `(i32) -> f32` or `(f32) -> f32`
57+
|| target.starts_with("wasm32-")
58+
{
5059
features.insert(Feature::NoSysF16);
60+
features.insert(Feature::NoSysF16F128Convert);
5161
}
5262

5363
for feature in features {

0 commit comments

Comments
 (0)