Skip to content

Commit 7d9b7d7

Browse files
committed
ci: force MSVC compilers for the Windows build
windows-2025 runners ship mingw64 in PATH, so CMake's Ninja compiler search picked GNU 15.2.0 over MSVC even after vcvars64. That broke the link two ways: GNU ar choked in BundleStaticLibrary.cmake, and MinGW ld missed ws2_32 (MSVC-only pragma comment lib). Pin CC/CXX=cl to match the main repo's VS-based Windows builds.
1 parent 34975b6 commit 7d9b7d7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ jobs:
127127
- name: Build Node.js native module (Windows)
128128
if: ${{ matrix.platform == 'win32' }}
129129
shell: cmd
130+
env:
131+
# windows-2025 images ship mingw64 in PATH, which CMake would
132+
# otherwise prefer over MSVC (breaking ws2_32 linking and ar).
133+
CC: cl
134+
CXX: cl
130135
run: |
131136
powershell.exe -Command "Add-MpPreference -ExclusionPath '${{ github.workspace }}'"
132137
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"

0 commit comments

Comments
 (0)