Skip to content

Commit a432a8d

Browse files
kkraus14cursoragent
andcommitted
Fix link.exe for all build steps: rename Git's link.exe once
GITHUB_PATH prepend fixed cibuildwheel but not the Cython test build step which runs in a different venv context. Rename Git's /usr/bin/link.exe at the start of the job so MSVC's linker is found in all steps regardless of PATH ordering. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 6468603 commit a432a8d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/build-wheel.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,14 @@ jobs:
113113
# outer environment. Pass DISTUTILS_USE_SDK=1 so setuptools uses those
114114
# vars directly instead of calling vcvarsall.bat (which can exceed the
115115
# cmd.exe ~8KB command line limit with build[uv]'s longer PATH).
116-
- name: Set DISTUTILS_USE_SDK (Windows)
116+
- name: Set DISTUTILS_USE_SDK and fix link.exe (Windows)
117117
if: ${{ startsWith(inputs.host-platform, 'win') }}
118118
run: |
119119
echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV
120-
echo "${VCToolsInstallDir}bin/Hostx64/x64" >> $GITHUB_PATH
120+
# Git ships /usr/bin/link.exe (POSIX hardlink tool) which shadows
121+
# MSVC's linker. Rename it so MSVC's link.exe is always found.
122+
mv "C:/Program Files/Git/usr/bin/link.exe" \
123+
"C:/Program Files/Git/usr/bin/link.exe.bak" 2>/dev/null || true
121124
122125
# To keep the build workflow simple, all matrix jobs will build a wheel for later use within this workflow.
123126
- name: Build and check cuda.pathfinder wheel

0 commit comments

Comments
 (0)