Skip to content

Commit

Permalink
Add support for new Android overlay merged in swiftlang/swift#72634
Browse files Browse the repository at this point in the history
Also, remove the libc imports for one file and one test where they weren't needed.
  • Loading branch information
finagolfin committed Jun 8, 2024
1 parent 3b9dd49 commit 3a1c65f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#endif

public extension Collection {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#else
import Darwin.C
#endif
Expand Down
2 changes: 2 additions & 0 deletions Sources/Build/TestObservation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ public func generateTestObservationCode(buildParameters: BuildParameters) -> Str
@_exported import WinSDK
#elseif os(WASI)
@_exported import WASILibc
#elseif canImport(Android)
@_exported import Android
#else
@_exported import Darwin.C
#endif
Expand Down
2 changes: 2 additions & 0 deletions Sources/CoreCommands/SwiftCommandState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#endif

import func TSCBasic.exec
Expand Down
10 changes: 0 additions & 10 deletions Sources/PackageDescription/PackageDescription.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@
//
//===----------------------------------------------------------------------===//

#if canImport(Glibc)
@_implementationOnly import Glibc
#elseif canImport(Musl)
@_implementationOnly import Musl
#elseif canImport(Darwin)
@_implementationOnly import Darwin.C
#elseif canImport(ucrt) && canImport(WinSDK)
@_implementationOnly import ucrt
@_implementationOnly import struct WinSDK.HANDLE
#endif
@_implementationOnly import Foundation

/// The configuration of a Swift package.
Expand Down
11 changes: 0 additions & 11 deletions Tests/PackageLoadingTests/PD_5_3_LoadingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -505,17 +505,6 @@ final class PackageDescription5_3LoadingTests: PackageDescriptionLoadingTests {

func testNonZeroExitStatusDoesNotAssert() async throws {
let content = """
#if canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#elseif os(Windows)
import MSVCRT
import WinSDK
#else
import Darwin.C
#endif
print("crash")
exit(1)
"""
Expand Down

0 comments on commit 3a1c65f

Please sign in to comment.