Skip to content

Commit 41c04b4

Browse files
committed
Add some extra conditionals for swift-build on OpenBSD.
Despite the toolchain path being specified swift-build is still not initializing a toolchain properly. I have my suspicions, but I believe they can be addressed on the swift-build side, and this change on the swiftpm side is nonetheless correct.
1 parent 7ce9379 commit 41c04b4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Sources/Basics/Process.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public enum OperatingSystem: Hashable, Sendable {
1616
case linux
1717
case android
1818
case freebsd
19+
case openbsd
1920
case unknown
2021
}
2122

@@ -30,6 +31,8 @@ extension ProcessInfo {
3031
.windows
3132
#elseif os(FreeBSD)
3233
.freebsd
34+
#elseif os(OpenBSD)
35+
.openbsd
3336
#else
3437
.unknown
3538
#endif

Sources/PackageModel/Toolchain.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ extension Toolchain {
110110
.parentDirectory // bin
111111
.parentDirectory // usr
112112
.parentDirectory // <toolchain>
113-
case .freebsd:
113+
case .freebsd, .openbsd:
114114
return compilerPath
115115
.parentDirectory // bin
116116
.parentDirectory // local

0 commit comments

Comments
 (0)