# Building llbuild-analyze on Windows

**URL:** <https://forums.swift.org/t/building-llbuild-analyze-on-windows/85575>\
**Category:** Using Swift\
**Tags:** windows, llbuild\
**Created:** [March 25, 2026, 1:21pm UTC](https://forums.swift.org/t/building-llbuild-analyze-on-windows/85575 "2026-03-25T13:21:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stackotter](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/stackotter/32/20670_2.png) [@stackotter](https://forums.swift.org/u/stackotter)\
**Post date:** [March 25, 2026, 1:21pm UTC](https://forums.swift.org/t/building-llbuild-analyze-on-windows/85575/1 "2026-03-25T13:21:59Z")

</div>

I’m currently debugging the build times of the [moreSwift/swift-winui](https://github.com/moreSwift/swift-winui) (a fork of [thebrowsercompany/swift-winui](https://github.com/thebrowsercompany/swift-winui); identical for the purpose of this post).

I have my suspicions as to what’s causing the issues (i.e. linking) but I’d like to be able to verify and quantify that.

I’ve managed to build [llbuild-analyze](https://github.com/swiftlang/swift-llbuild/tree/1d9e20e1361ee34036d490e2b89d7ee3e00bc784/products/llbuild-analyze) on macOS, but if I run it against a build database from my Windows machine it fails trying to parse Windows paths, so I’ve resorted to trying to build llbuild-analyze on Windows.

* * *

If I run `swift run`, I get the following errors;

```swift
C:\Users\rohan\scratch\mirror\Users\stackotter\Desktop\Projects\Swift\swift-llbuild\products\llbuild
-analyze\.build\checkouts\swift-tools-support-core\Sources\TSCclibc\include\csqlite3.h:1:10: error:
'sqlite3.h' file not found
1 | #include <sqlite3.h>
  | `- error: 'sqlite3.h' file not found

C:\Users\rohan\scratch\mirror\Users\stackotter\Desktop\Projects\Swift\swift-llbuild\products\llbuild
-analyze\.build\checkouts\swift-tools-support-core\Sources\TSCUtility\SQLite.swift:14:29: error: cou
ld not build C module 'CSQLite3'
 12 | import TSCBasic
 13 |
 14 | @_implementationOnly import CSQLite3
    | `- error: could not build C module 'CSQLite3'
 15 |
 16 | /// A minimal SQLite wrapper.

```

To remedy that, I installed sqlite3 via vcpkg and attempted to build the package again;

```swift
> swift run -Xcc -I -Xcc C:\vcpkg\installed\x64-windows\include -Xlinker -L -Xlinker C:\vcpkg\installed\x64-windows\lib

...

lld-link: error: duplicate symbol: sqlite3_bind_null
>>> defined at C:\\Users\\rohan\\scratch\\mirror\\Users\\stackotter\\Desktop\\Projects\\Swift\\swift
-llbuild\\products\\llbuild-analyze\\.build\\x86_64-unknown-windows-msvc\\debug\\SwiftToolchainCSQLi
te.build\\sqlite3.c.o
>>> defined at sqlite3.lib(sqlite3.dll)

lld-link: error: duplicate symbol: sqlite3_bind_text
>>> defined at C:\\Users\\rohan\\scratch\\mirror\\Users\\stackotter\\Desktop\\Projects\\Swift\\swift
-llbuild\\products\\llbuild-analyze\\.build\\x86_64-unknown-windows-msvc\\debug\\SwiftToolchainCSQLi
te.build\\sqlite3.c.o
>>> defined at sqlite3.lib(sqlite3.dll)

```

* * *

`swift-tools-support-core` depends on `sqlite3` as a system package while `swift-toolchain-sqlite` builds `sqlite3` from source. Is there some known way to get this to build without refactoring things to depend on a single copy of sqlite? (I ask as I begin refactoring while waiting for a response 😅 )

---

<div class="post-metadata">

**Author:** ![stackotter](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/stackotter/32/20670_2.png) [@stackotter](https://forums.swift.org/u/stackotter)\
**Post date:** [March 25, 2026, 1:48pm UTC](https://forums.swift.org/t/building-llbuild-analyze-on-windows/85575/2 "2026-03-25T13:48:51Z")

</div>

False alarm, the `TSCBasic` dependency was trivial to remove and then everything builds fine on Windows. Additionally, the path errors that I got on macOS were actually just because llbuild-analyze requires that all of its arguments are absolute paths (which manifested as the path-related `try!` panic that I misinterpreted).
