Skip to content

Commit ef40a07

Browse files
committed
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: nodejs#4471 Refs: frerich/clcache#342 Assisted-by: Claude Code Signed-off-by: Yasunobu <[email protected]>
1 parent 34fc841 commit ef40a07

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎jenkins/scripts/windows/compile.cmd‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ set "not_clang=%errorlevel%"
1212
if %not_clang% equ 1 if not defined DISABLE_CLCACHE if exist C:\clcache\dist\clcache_main\clcache_main.exe (
1313
set CLCACHE_OBJECT_CACHE_TIMEOUT_MS=60000
1414
set CLCACHE_BASEDIR="%WORKSPACE%"
15+
:: Keep the cache out of %USERPROFILE%, which trips frerich/clcache#342
16+
set CLCACHE_DIR=C:\clcache_dir
1517
set CLCACHE_HARDLINK=1
1618
set "msbuild_args=%msbuild_args% /p:CLToolExe=clcache_main.exe /p:CLToolPath=C:\clcache\dist\clcache_main"
1719
:: multiproc msbuild doesn't play nice with clcache

0 commit comments

Comments
 (0)