Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
Swiftpm looks for the Swift stdlib relative to the swift compiler, but that's a
|
|
wrapper in our case. It wants to add the stdlib to the rpath, which is
|
|
necessary for back-deployment of some features.
|
|
|
|
--- a/Sources/PackageModel/Toolchain.swift
|
|
+++ b/Sources/PackageModel/Toolchain.swift
|
|
@@ -53,12 +53,18 @@ extension Toolchain {
|
|
|
|
public var macosSwiftStdlib: AbsolutePath {
|
|
get throws {
|
|
+ if swiftCompilerPath.pathString.starts(with: "@storeDir@") {
|
|
+ return AbsolutePath("@swiftLib@/lib/swift/macosx")
|
|
+ }
|
|
return try AbsolutePath(validating: "../../lib/swift/macosx", relativeTo: resolveSymlinks(swiftCompilerPath))
|
|
}
|
|
}
|
|
|
|
public var toolchainLibDir: AbsolutePath {
|
|
get throws {
|
|
+ if swiftCompilerPath.pathString.starts(with: "@storeDir@") {
|
|
+ return AbsolutePath("@swiftLib@/lib")
|
|
+ }
|
|
// FIXME: Not sure if it's better to base this off of Swift compiler or our own binary.
|
|
return try AbsolutePath(validating: "../../lib", relativeTo: resolveSymlinks(swiftCompilerPath))
|
|
}
|