Skip to content

Commit

Permalink
Revert "generator/linux: Use swiftResourcesPath to find framework h…
Browse files Browse the repository at this point in the history
…eaders (…" (#142)

This reverts commit 2ae9e21.
  • Loading branch information
euanh authored Nov 1, 2024
1 parent 2ae9e21 commit bde8791
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
13 changes: 0 additions & 13 deletions Sources/SwiftSDKGenerator/SwiftSDKRecipes/LinuxRecipe.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)_\(
Expand Down

0 comments on commit bde8791

Please sign in to comment.