From ef40a07bfb117b618a63dc3cc4b1c41992bf1663 Mon Sep 17 00:00:00 2001 From: Yasunobu <42543015+P4suta@users.noreply.github.com> Date: Wed, 16 Sep 2026 23:54:45 +0900 Subject: [PATCH] jenkins,win: move clcache cache out of user profile clcache defaults its cache directory to %USERPROFILE%\clcache, which triggers a long-standing upstream bug where the atomic rename of stats.txt fails with "[WinError 5] Access is denied". Set CLCACHE_DIR to a path outside the profile, which is the workaround confirmed in the upstream issue. Refs: https://github.com/nodejs/build/issues/4471 Refs: https://github.com/frerich/clcache/issues/342 Assisted-by: Claude Code Signed-off-by: Yasunobu <42543015+P4suta@users.noreply.github.com> --- jenkins/scripts/windows/compile.cmd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jenkins/scripts/windows/compile.cmd b/jenkins/scripts/windows/compile.cmd index 083373c92..0592cc7f3 100644 --- a/jenkins/scripts/windows/compile.cmd +++ b/jenkins/scripts/windows/compile.cmd @@ -12,6 +12,8 @@ set "not_clang=%errorlevel%" if %not_clang% equ 1 if not defined DISABLE_CLCACHE if exist C:\clcache\dist\clcache_main\clcache_main.exe ( set CLCACHE_OBJECT_CACHE_TIMEOUT_MS=60000 set CLCACHE_BASEDIR="%WORKSPACE%" + :: Keep the cache out of %USERPROFILE%, which trips frerich/clcache#342 + set CLCACHE_DIR=C:\clcache_dir set CLCACHE_HARDLINK=1 set "msbuild_args=%msbuild_args% /p:CLToolExe=clcache_main.exe /p:CLToolPath=C:\clcache\dist\clcache_main" :: multiproc msbuild doesn't play nice with clcache