Skip to content

Commit 28251a7

Browse files
authored
Merge pull request #19846 from drodriguez/android-aarch64-disable-powl
[android] Fix powl test in Android ARMv7/AArch64.
2 parents 620c796 + 7455fb7 commit 28251a7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

stdlib/public/core/CTypes.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ public typealias CLongDouble = Float80
8787
// Long Double type equivalent to Double type.
8888
public typealias CLongDouble = Double
8989
#endif
90+
#elseif os(Android)
91+
// On Android, long double is Float128 for AAPCS64, which we don't have yet in
92+
// Swift (SR-9072); and Double for ARMv7.
93+
#if arch(arm)
94+
public typealias CLongDouble = Double
95+
#endif
9096
#endif
9197

9298
// FIXME: Is it actually UTF-32 on Darwin?

test/ClangImporter/cfuncs_parse.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,13 @@ func test_pow() {
5858
pow(1.5, 2.5)
5959
}
6060

61+
#if !((os(Android) || os(Linux)) && arch(arm64))
62+
// long doubles in AAPCS64 are 128 bits, which is not supported by
63+
// Swift, so don't test this. SR-9072.
6164
func test_powl() {
6265
powl(1.5, 2.5)
6366
}
67+
#endif
6468

6569
func test_puts(_ s: String) {
6670
_ = s.withCString { puts($0) + 32 };

0 commit comments

Comments
 (0)