Skip to content

Commit 744d0a4

Browse files
hsbtclaude
andcommitted
Point mkmf at the vcpkg packages on mswin
The mswin builds from cache.ruby-lang.org keep the build machine's paths out of configure_args, so extconf.rb no longer finds the vcpkg headers and libraries that ruby-loco located through --with-opt-dir. #976 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 1bb4f9b commit 744d0a4

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

‎dist/index.js‎

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎windows.js‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,16 @@ async function installVCPKG(url) {
224224
throw new Error(`Missing vcVars file: ${vcVars}`)
225225
}
226226

227-
return exportCommandEnv(`set "MAKE=nmake" && "${vcVars}"`)
227+
const paths = exportCommandEnv(`set "MAKE=nmake" && "${vcVars}"`)
228+
229+
// mswin Rubies do not record the vcpkg location in configure_args, so the compiler and linker find it through INCLUDE and LIB
230+
const vcpkgDir = `${extractPath}\\installed\\${os.arch()}-windows`
231+
exportEnv({
232+
INCLUDE: `${vcpkgDir}\\include;${process.env.INCLUDE}`,
233+
LIB: `${vcpkgDir}\\lib;${process.env.LIB}`
234+
})
235+
236+
return paths
228237
})
229238
}
230239

0 commit comments

Comments
 (0)