Skip to content

Commit 13882c7

Browse files
authored
Merge pull request #48 from gmittert/DlligentSearching
Search for Shared Libraries Properly on Windows
2 parents 1535db3 + 1715ee2 commit 13882c7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Sources/ISDBTibs/TibsToolchain.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,25 @@ public final class TibsToolchain {
2424
self.swiftc = swiftc
2525
self.clang = clang
2626

27+
#if os(Windows)
28+
let dylibFolder = "bin"
29+
#else
30+
let dylibFolder = "lib"
31+
#endif
32+
2733
self.libIndexStore = libIndexStore ?? swiftc
2834
.deletingLastPathComponent()
2935
.deletingLastPathComponent()
30-
.appendingPathComponent("lib/libIndexStore.\(TibsToolchain.dylibExt)", isDirectory: false)
36+
.appendingPathComponent("\(dylibFolder)/libIndexStore.\(TibsToolchain.dylibExt)", isDirectory: false)
3137

3238
self.tibs = tibs
3339
self.ninja = ninja
3440
}
3541

3642
#if os(macOS)
3743
public static let dylibExt = "dylib"
44+
#elseif os(Windows)
45+
public static let dylibExt = "dll"
3846
#else
3947
public static let dylibExt = "so"
4048
#endif

0 commit comments

Comments
 (0)