Skip to content

Commit cf666c2

Browse files
authored
Fix a compatibility issue with Swift 6.0 and main snapshots (#125)
It doesn't seem that projects depending on Foundation can be cross-compiled with 6.0 Swift SDKs (`error: missing required module '_FoundationCShims'), but at least the generation process completes successfully.
1 parent 453bd3f commit cf666c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/SwiftSDKGenerator/SwiftSDKRecipes/LinuxRecipe.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ public struct LinuxRecipe: SwiftSDKRecipe {
225225
hostTriple: self.mainHostTriple
226226
)
227227

228-
try await generator.symlinkClangHeaders()
228+
if versionsConfiguration.swiftVersion.hasPrefix("5.9") || versionsConfiguration.swiftVersion.hasPrefix("5.10") {
229+
try await generator.symlinkClangHeaders()
230+
}
229231

230232
let autolinkExtractPath = generator.pathsConfiguration.toolchainBinDirPath.appending("swift-autolink-extract")
231233

0 commit comments

Comments
 (0)