From bde879185283f3b46b806609e8f2180ffe913b4b Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 1 Nov 2024 18:42:43 +0000 Subject: [PATCH] =?UTF-8?q?Revert=20"generator/linux:=20Use=20`swiftResour?= =?UTF-8?q?cesPath`=20to=20find=20framework=20headers=20(=E2=80=A6"=20(#14?= =?UTF-8?q?2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 2ae9e2191d8265322fc5251c648d306a7d584e25. --- .../Generator/SwiftSDKGenerator+Copy.swift | 3 +++ .../SwiftSDKRecipes/LinuxRecipe.swift | 13 ------------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Sources/SwiftSDKGenerator/Generator/SwiftSDKGenerator+Copy.swift b/Sources/SwiftSDKGenerator/Generator/SwiftSDKGenerator+Copy.swift index 1220cd9..01b1bcd 100644 --- a/Sources/SwiftSDKGenerator/Generator/SwiftSDKGenerator+Copy.swift +++ b/Sources/SwiftSDKGenerator/Generator/SwiftSDKGenerator+Copy.swift @@ -101,6 +101,9 @@ extension SwiftSDKGenerator { ("swift/linux", pathsConfiguration.toolchainDirPath.appending("usr/lib/swift")), ("swift_static/linux", pathsConfiguration.toolchainDirPath.appending("usr/lib/swift_static")), ("swift_static/shims", pathsConfiguration.toolchainDirPath.appending("usr/lib/swift_static")), + ("swift/dispatch", sdkDirPath.appending("usr/include")), + ("swift/os", sdkDirPath.appending("usr/include")), + ("swift/CoreFoundation", sdkDirPath.appending("usr/include")), ] { try await rsync(from: distributionPath.appending(pathWithinPackage), to: pathWithinSwiftSDK) } diff --git a/Sources/SwiftSDKGenerator/SwiftSDKRecipes/LinuxRecipe.swift b/Sources/SwiftSDKGenerator/SwiftSDKRecipes/LinuxRecipe.swift index 4c2d0d3..f92c4b9 100644 --- a/Sources/SwiftSDKGenerator/SwiftSDKRecipes/LinuxRecipe.swift +++ b/Sources/SwiftSDKGenerator/SwiftSDKRecipes/LinuxRecipe.swift @@ -115,19 +115,6 @@ public struct LinuxRecipe: SwiftSDKRecipe { toolset.librarian = Toolset.ToolProperties(path: "llvm-ar") } - public func applyPlatformOptions( - metadata: inout SwiftSDKMetadataV4.TripleProperties, - paths: PathsConfiguration, - targetTriple: Triple - ) { - var relativeSDKDir = self.sdkDirPath(paths: paths) - guard relativeSDKDir.removePrefix(paths.swiftSDKRootPath) else { - fatalError("The SDK directory path must be a subdirectory of the Swift SDK root path.") - } - metadata.swiftResourcesPath = relativeSDKDir.appending("usr/lib/swift").string - metadata.swiftStaticResourcesPath = relativeSDKDir.appending("usr/lib/swift_static").string - } - public var defaultArtifactID: String { """ \(self.versionsConfiguration.swiftVersion)_\(self.linuxDistribution.name.rawValue)_\(