Skip to content

[6.0] Import new Android overlay or Bionic module #1660

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
Aug 7, 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
6 changes: 6 additions & 0 deletions Sources/SwiftDriver/Driver/ToolExecutionDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import WinSDK
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Bionic)
import Bionic
#else
#error("Missing libc or equivalent")
#endif
Expand Down Expand Up @@ -136,7 +138,11 @@ import var TSCBasic.stdoutStream
}
#else
case .signalled(let signal):
#if canImport(Bionic)
let errorMessage = String(cString: strsignal(signal))
#else
let errorMessage = strsignal(signal).map { String(cString: $0) } ?? ""
#endif
messages = constructJobSignalledMessages(job: job, error: errorMessage, output: output,
signal: signal, pid: pid).map {
ParsableMessage(name: job.kind.rawValue, kind: .signalled($0))
Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftDriver/SwiftScan/Loader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#endif

internal enum Loader {
Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftDriver/Utilities/DateAdditions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Bionic)
import Bionic
#endif

/// Represents a time point value with nanosecond precision.
Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftDriver/Utilities/System.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#endif

func argumentNeedsQuoting(_ argument: String) -> Bool {
Expand Down
2 changes: 2 additions & 0 deletions Sources/swift-build-sdk-interfaces/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Bionic)
import Bionic
#endif

import class TSCBasic.DiagnosticsEngine
Expand Down
2 changes: 2 additions & 0 deletions Sources/swift-driver/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#endif

import Dispatch
Expand Down