Skip to content

Commit 94f02c3

Browse files
authored
JavaScriptKit: import Android module for non-Wasm Android targets (#722)
Building JavaScriptKit for the Swift 6.3 Android SDK triples (e.g. aarch64-unknown-linux-android28, x86_64-unknown-linux-android30) fails in ThreadLocal.swift with: error: cannot find 'pthread_key_create' in scope error: cannot find 'pthread_key_t' in scope Android uses Bionic, exposed to Swift as the `Android` module, rather than Glibc. The existing conditional falls through to `#error("Unsupported platform")` on Android. Add a `canImport(Android)` branch between the Darwin and Glibc branches, matching the pattern already used by Foundation and swift-corelibs-libdispatch. No Wasm, Darwin, or Glibc behavior changes.
1 parent ff90c3e commit 94f02c3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Sources/JavaScriptKit/ThreadLocal.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import wasi_pthread
44
#endif
55
#elseif canImport(Darwin)
66
import Darwin
7+
#elseif canImport(Android)
8+
import Android
79
#elseif canImport(Glibc)
810
import Glibc
911
#else

0 commit comments

Comments
 (0)