Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Sources/SwiftDriver/Driver/ToolExecutionDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import ucrt
import WinSDK
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#else
#error("Missing libc or equivalent")
#endif
Expand Down
6 changes: 4 additions & 2 deletions Sources/SwiftDriver/SwiftScan/Loader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ import var Foundation.NSLocalizedDescriptionKey
import WinSDK
#elseif os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
import Darwin
#else
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#endif

internal enum Loader {
Expand Down Expand Up @@ -130,7 +132,7 @@ extension Loader.Flags {
Loader.Flags(rawValue: 0)
}

#if os(Linux)
#if os(Linux) && canImport(Glibc)
public static var deepBind: Loader.Flags {
Loader.Flags(rawValue: RTLD_DEEPBIND)
}
Expand Down
4 changes: 3 additions & 1 deletion Sources/SwiftDriver/Utilities/DateAdditions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
import WinSDK
#elseif os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
import Darwin
#else
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#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 @@ -14,6 +14,8 @@
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#endif

func argumentNeedsQuoting(_ argument: String) -> Bool {
Expand Down
4 changes: 3 additions & 1 deletion Sources/swift-build-sdk-interfaces/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import SwiftDriver
import CRT
#elseif os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
import Darwin
#else
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#endif

import TSCBasic // <<<
Expand Down
4 changes: 3 additions & 1 deletion Sources/swift-driver/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import SwiftDriver
import CRT
#elseif os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
import Darwin
#else
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#endif

import Dispatch
Expand Down