Skip to content

Commit f44dbd5

Browse files
authored
Merge pull request #321 from compnerd/libraries
SKCore: adjust library loading for Windows
2 parents 2c4da0a + fe61238 commit f44dbd5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/SKCore/Toolchain.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,22 @@ extension Toolchain {
152152
self.sourcekitd = sourcekitdPath
153153
foundAny = true
154154
} else {
155+
#if os(Windows)
156+
let sourcekitdPath = binPath.appending(component: "sourcekitdInProc\(dylibExt)")
157+
#else
155158
let sourcekitdPath = libPath.appending(component: "libsourcekitdInProc\(dylibExt)")
159+
#endif
156160
if fs.isFile(sourcekitdPath) {
157161
self.sourcekitd = sourcekitdPath
158162
foundAny = true
159163
}
160164
}
161165

166+
#if os(Windows)
167+
let libIndexStore = binPath.appending(components: "libIndexStore\(dylibExt)")
168+
#else
162169
let libIndexStore = libPath.appending(components: "libIndexStore\(dylibExt)")
170+
#endif
163171
if fs.isFile(libIndexStore) {
164172
self.libIndexStore = libIndexStore
165173
foundAny = true

0 commit comments

Comments
 (0)