Skip to content

Commit 46785ab

Browse files
authored
Merge branch 'main' into windows-toolchain
2 parents 7e82541 + 8414a8b commit 46785ab

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift

-30
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,6 @@ import SwiftOptions
1515
extension Toolchain {
1616
// MARK: - Path computation
1717

18-
func computeResourceDirPath(
19-
for triple: Triple,
20-
parsedOptions: inout ParsedOptions,
21-
isShared: Bool
22-
) throws -> AbsolutePath {
23-
// FIXME: This almost certainly won't be an absolute path in practice...
24-
let resourceDirBase: AbsolutePath
25-
if let resourceDir = parsedOptions.getLastArgument(.resourceDir) {
26-
resourceDirBase = try AbsolutePath(validating: resourceDir.asSingle)
27-
} else if !triple.isDarwin,
28-
let sdk = parsedOptions.getLastArgument(.sdk),
29-
let sdkPath = try? AbsolutePath(validating: sdk.asSingle) {
30-
resourceDirBase = sdkPath
31-
.appending(components: "usr", "lib",
32-
isShared ? "swift" : "swift_static")
33-
} else if triple.isWindows,
34-
let SDKROOT = env["SDKROOT"],
35-
let sdkPath = try? AbsolutePath(validating: SDKROOT) {
36-
resourceDirBase = sdkPath
37-
.appending(components: "usr", "lib",
38-
isShared ? "swift" : "swift_static")
39-
} else {
40-
resourceDirBase = try getToolPath(.swiftCompiler)
41-
.parentDirectory // remove /swift
42-
.parentDirectory // remove /bin
43-
.appending(components: "lib", isShared ? "swift" : "swift_static")
44-
}
45-
return resourceDirBase.appending(components: triple.platformName() ?? "")
46-
}
47-
4818
func computeSecondaryResourceDirPath(for triple: Triple, primaryPath: VirtualPath) -> VirtualPath? {
4919
guard triple.isMacCatalyst else { return nil }
5020
return primaryPath.parentDirectory.appending(component: "macosx")

0 commit comments

Comments
 (0)