File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -265,8 +265,25 @@ public final class BuildExecutionContext {
265
265
private var indexStoreAPICache = LazyCache ( createIndexStoreAPI)
266
266
private func createIndexStoreAPI( ) -> Result < IndexStoreAPI , Error > {
267
267
Result {
268
+ #if os(Windows)
269
+ // The library's runtime component is in the `bin` directory on
270
+ // Windows rather than the `lib` directory as on unicies. The `lib`
271
+ // directory contains the import library (and possibly static
272
+ // archives) which are used for linking. The runtime component is
273
+ // not (necessarily) part of the SDK distributions.
274
+ //
275
+ // NOTE: the library name here `libIndexStore.dll` is technically
276
+ // incorrect as per the Windows naming convention. However, the
277
+ // library is currently installed as `libIndexStore.dll` rather than
278
+ // `IndexStore.dll`. In the future, this may require a fallback
279
+ // search, preferring `IndexStore.dll` over `libIndexStore.dll`.
280
+ let indexStoreLib = buildParameters. toolchain. swiftCompiler
281
+ . parentDirectory
282
+ . appending ( component: " libIndexStore.dll " )
283
+ #else
268
284
let ext = buildParameters. hostTriple. dynamicLibraryExtension
269
285
let indexStoreLib = buildParameters. toolchain. toolchainLibDir. appending ( component: " libIndexStore " + ext)
286
+ #endif
270
287
return try IndexStoreAPI ( dylib: indexStoreLib)
271
288
}
272
289
}
You can’t perform that action at this time.
0 commit comments