Skip to content

Add support for new Android overlay (import Android) #7615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 1 addition & 7 deletions Sources/PackageDescription/PackageDescription.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@
//
//===----------------------------------------------------------------------===//

#if canImport(Glibc)
@_implementationOnly import Glibc
#elseif canImport(Musl)
@_implementationOnly import Musl
#elseif canImport(Darwin)
@_implementationOnly import Darwin.C
#elseif canImport(ucrt) && canImport(WinSDK)
#if canImport(ucrt) && canImport(WinSDK)
@_implementationOnly import ucrt
@_implementationOnly import struct WinSDK.HANDLE
#endif
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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hyp, the Windows CI passed but I notice it doesn't run the SPM tests, just builds the source? Let me know if this change is okay on Windows.

#else
import Darwin.C
#endif

print("crash")
exit(1)
"""
Expand Down