Skip to content

Commit c59cd79

Browse files
hsbtclaude
andcommitted
Use the vcpkg pkgconf on mswin
The mswin builds have an empty PKG_CONFIG in RbConfig, so mkmf ran the MSYS2 pkg-config on PATH, which pointed fiddle at the MinGW libffi headers and broke the MSVC build. ruby-loco meant to set PKG_CONFIG to this pkgconf, but its path missed a variable and pointed nowhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d0c673a commit c59cd79

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎dist/index.js‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎windows.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,12 @@ async function installVCPKG(url) {
233233
LIB: `${vcpkgDir}\\lib;${process.env.LIB}`
234234
})
235235

236+
// Without this mkmf runs the MSYS2 pkg-config on PATH, whose MinGW flags break MSVC builds
237+
exportEnv({
238+
PKG_CONFIG: `${vcpkgDir}\\tools\\pkgconf\\pkgconf.exe`,
239+
PKG_CONFIG_PATH: `${vcpkgDir}\\lib\\pkgconfig`
240+
})
241+
236242
return paths
237243
})
238244
}

0 commit comments

Comments
 (0)