diff --git a/jenkins/scripts/VersionSelectorScript.groovy b/jenkins/scripts/VersionSelectorScript.groovy index efd21ceb4..0fdad71f3 100644 --- a/jenkins/scripts/VersionSelectorScript.groovy +++ b/jenkins/scripts/VersionSelectorScript.groovy @@ -58,10 +58,9 @@ def buildExclusions = [ [ /vs2015(-\w+)?$/, testType, gte(18) ], [ /vs2017(-\w+)?$/, testType, gte(18) ], [ /vs2019(-\w+)?$/, testType, gte(21) ], - [ /vs2022(-\w+)?$/, testType, lt(20) ], // Temporarily compile Node v20+ on both VS2019 and VS2022 - [ /vs2022-x86$/, testType, lt(20) ], // Temporarily compile Node v20+ arm64 and x86 on both VS2019 and VS2022 - [ /vs2022-x86$/, testType, gte(23) ], - [ /vs2022-arm64$/, testType, lt(20) ], + [ /vs2022(-\w+)?$/, testType, lt(21) ], + [ /vs2022-x86$/, testType, gte(23) ], // x86 was dropped on Windows in v23 + [ /vs2022_clang(-\w+)?$/, testType, lt(23) ], // ClangCL support was added in v23 [ /COMPILED_BY-\w+-arm64$/, testType, lt(20) ], // run tests on arm64 for >=19 // VS versions supported to build add-ons [ /vs2015-COMPILED_BY/, testType, gte(20) ], diff --git a/jenkins/scripts/windows/compile.cmd b/jenkins/scripts/windows/compile.cmd index 3e41f8d3f..cb62e24f3 100644 --- a/jenkins/scripts/windows/compile.cmd +++ b/jenkins/scripts/windows/compile.cmd @@ -4,8 +4,12 @@ if %NODEJS_MAJOR_VERSION% leq 12 set "PATH=C:\Python27\;C:\Python27\Scripts;%PAT :: Opt-in for a generating binlog (work with code has https://github.com/nodejs/node/pull/26431/files) set "msbuild_args=/binaryLogger:node.binlog" +:: Check if compiler is ClangCL +echo %nodes% | findstr /R "_clang" >nul +set "not_clang=%errorlevel%" + :: Opt-in for a clcache -if not defined DISABLE_CLCACHE if exist C:\clcache\dist\clcache_main\clcache_main.exe ( +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%" set CLCACHE_HARDLINK=1 @@ -50,6 +54,9 @@ if "%nodes:~-6%" == "-arm64" ( ) else ( set "VCBUILD_EXTRA_ARGS=x64 %VCBUILD_EXTRA_ARGS%" ) +if %not_clang% equ 0 ( + set "VCBUILD_EXTRA_ARGS=%VCBUILD_EXTRA_ARGS% clang-cl" +) set DEBUG_HELPER=1 call vcbuild.bat %VCBUILD_EXTRA_ARGS% if errorlevel 1 exit /b