mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
[ToolchainRegistry] Prefer .dylib SourceKit plugins over .framework
rdar://170177167
(cherry picked from commit f6c50f5e04)
This commit is contained in:
@@ -361,14 +361,14 @@ public final class Toolchain: Sendable {
|
||||
}
|
||||
|
||||
func findDylib(named name: String, searchFramework: Bool = false) -> URL? {
|
||||
let frameworkPath = libPath.appending(components: "\(name).framework", name)
|
||||
if FileManager.default.isFile(at: frameworkPath) {
|
||||
return frameworkPath
|
||||
}
|
||||
let libSearchPath = libPath.appending(component: "lib\(name)\(dylibExtension)")
|
||||
if FileManager.default.isFile(at: libSearchPath) {
|
||||
return libSearchPath
|
||||
}
|
||||
let frameworkPath = libPath.appending(components: "\(name).framework", name)
|
||||
if FileManager.default.isFile(at: frameworkPath) {
|
||||
return frameworkPath
|
||||
}
|
||||
#if os(Windows)
|
||||
let binSearchPath = binPath.appending(component: "\(name)\(dylibExtension)")
|
||||
if FileManager.default.isFile(at: binSearchPath) {
|
||||
|
||||
Reference in New Issue
Block a user