Skip to content

Commit 0a56e4b

Browse files
committed
Add support for new Android overlay (import Android) (#7615)
This adds the overlay to four of the six files that currently `import Glibc`, with those last two showing no difference if this _wasn't_ added, like `PackageDescription.swift`.
1 parent 397c7d6 commit 0a56e4b

File tree

6 files changed

+9
-18
lines changed

6 files changed

+9
-18
lines changed

Fixtures/DependencyResolution/External/Complex/FisherYates/src/Fisher-Yates_Shuffle.swift

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import Darwin
44
import Glibc
55
#elseif canImport(Musl)
66
import Musl
7+
#elseif canImport(Android)
8+
import Android
79
#endif
810

911
public extension Collection {

Fixtures/Miscellaneous/EchoExecutable/Sources/secho/main.swift

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import Glibc
33
#elseif canImport(Musl)
44
import Musl
5+
#elseif canImport(Android)
6+
import Android
57
#else
68
import Darwin.C
79
#endif

Sources/Build/TestObservation.swift

+2
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ public func generateTestObservationCode(buildParameters: BuildParameters) -> Str
132132
@_exported import WinSDK
133133
#elseif os(WASI)
134134
@_exported import WASILibc
135+
#elseif canImport(Android)
136+
@_exported import Android
135137
#else
136138
@_exported import Darwin.C
137139
#endif

Sources/CoreCommands/SwiftCommandState.swift

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ import Darwin
3939
import Glibc
4040
#elseif canImport(Musl)
4141
import Musl
42+
#elseif canImport(Android)
43+
import Android
4244
#endif
4345

4446
import func TSCBasic.exec

Sources/PackageDescription/PackageDescription.swift

+1-7
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#if canImport(Glibc)
14-
@_implementationOnly import Glibc
15-
#elseif canImport(Musl)
16-
@_implementationOnly import Musl
17-
#elseif canImport(Darwin)
18-
@_implementationOnly import Darwin.C
19-
#elseif canImport(ucrt) && canImport(WinSDK)
13+
#if canImport(ucrt) && canImport(WinSDK)
2014
@_implementationOnly import ucrt
2115
@_implementationOnly import struct WinSDK.HANDLE
2216
#endif

Tests/PackageLoadingTests/PD_5_3_LoadingTests.swift

-11
Original file line numberDiff line numberDiff line change
@@ -505,17 +505,6 @@ final class PackageDescription5_3LoadingTests: PackageDescriptionLoadingTests {
505505

506506
func testNonZeroExitStatusDoesNotAssert() async throws {
507507
let content = """
508-
#if canImport(Glibc)
509-
import Glibc
510-
#elseif canImport(Musl)
511-
import Musl
512-
#elseif os(Windows)
513-
import MSVCRT
514-
import WinSDK
515-
#else
516-
import Darwin.C
517-
#endif
518-
519508
print("crash")
520509
exit(1)
521510
"""

0 commit comments

Comments
 (0)