Skip to content

Commit 01da39d

Browse files
committed
fix: provide libxml2s.lib for Windows LLVM link via vcpkg copy into LLVM prefix
llvm-config --system-libs demands libxml2s.lib but the LLVM tarball doesn't ship it. Install via vcpkg and copy the .lib into the LLVM prefix lib dir so the linker finds it without a global LIB override (which previously caused duplicate symbols).
1 parent 456e21b commit 01da39d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,28 @@ jobs:
118118

119119
# ── Platform dependencies ─────────────────────────────────────
120120

121+
- name: Provide libxml2 for Windows LLVM link
122+
if: runner.os == 'Windows'
123+
shell: pwsh
124+
run: |
125+
# llvm-config --system-libs demands libxml2s.lib but the LLVM
126+
# tarball doesn't ship it. Install via vcpkg and copy the .lib
127+
# into the LLVM prefix lib dir so the linker finds it without
128+
# a global LIB override (which previously caused duplicate symbols).
129+
vcpkg install libxml2:x64-windows-static
130+
$src = "$env:VCPKG_INSTALLATION_ROOT\installed\x64-windows-static\lib\libxml2s.lib"
131+
$dest = "$env:USERPROFILE\llvm\lib\libxml2s.lib"
132+
if (-not (Test-Path $src)) {
133+
# Fallback: try the non-static triplet
134+
$src = "$env:VCPKG_INSTALLATION_ROOT\installed\x64-windows\lib\libxml2s.lib"
135+
}
136+
if (-not (Test-Path $src)) {
137+
Write-Error "libxml2s.lib not found after vcpkg install"
138+
exit 1
139+
}
140+
Copy-Item $src $dest -Force
141+
Write-Host "Copied libxml2s.lib to $dest"
142+
121143
# ── Rust Toolchain ────────────────────────────────────────────
122144

123145
- name: Install Rust

0 commit comments

Comments
 (0)