@@ -80,7 +80,10 @@ REM sed -e "s/^VERSION = .*/VERSION = ${version}/" -i.bak Makefile.rule
8080
8181for /f " tokens=3 delims= " %%v in ('findstr /b " version = " ..\pyproject.toml') do set version = %%v
8282set version = %version:" =%
83- powershell -Command " (Get-Content OpenBLAS/Makefile.rule) -replace '^VERSION = .*', 'VERSION = %version% ' | Set-Content Makefile.rule"
83+ REM cwd is already OpenBLAS here, so the source is Makefile.rule, not
84+ REM OpenBLAS/Makefile.rule -- that path never existed, Get-Content errored,
85+ REM and the VERSION substitution silently never happened.
86+ powershell -Command " (Get-Content Makefile.rule) -replace '^VERSION = .*', 'VERSION = %version% ' | Set-Content Makefile.rule"
8487
8588REM Set suffixed-ILP64 flags
8689if " %if_bits% " == " 64" (
@@ -94,9 +97,47 @@ if exist build (rmdir /S /Q build || exit /b 1)
9497mkdir build || exit /b 1 & cd build || exit /b 1
9598
9699echo Setting up ARM64 Developer Command Prompt and running CMake...
97-
98- REM Initialize VS ARM64 environment
99- CALL " C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsarm64.bat"
100+
101+ REM Initialize VS ARM64 environment.
102+ REM
103+ REM Ask vswhere where Visual Studio is rather than hardcoding the version and
104+ REM edition: the windows-11-arm image migrated from VS 2022 to VS 2026 in
105+ REM September 2026 (actions/runner-images#14602), which broke the old
106+ REM hardcoded 2022\Enterprise path. That failed silently -- CALL on a missing
107+ REM batch file sets no errorlevel worth checking here -- so the vcvars
108+ REM environment was simply never applied and the first visible symptom was
109+ REM CMake reporting "CMAKE_MT-NOTFOUND" and "Detecting C compiler ABI info -
110+ REM failed", because mt.exe and the MSVC/SDK paths were missing. Fail loudly
111+ REM instead, so the next image change is obvious from the log.
112+ set " VSWHERE = %ProgramFiles(x86)% \Microsoft Visual Studio\Installer\vswhere.exe"
113+ if not exist " %VSWHERE% " set " VSWHERE = %ProgramFiles% \Microsoft Visual Studio\Installer\vswhere.exe"
114+ if not exist " %VSWHERE% " (
115+ echo Error: cannot find vswhere.exe, so cannot locate Visual Studio.
116+ exit /b 1
117+ )
118+ set " VSINSTALL = "
119+ for /f " usebackq delims=" %%i in (`" %VSWHERE% " -latest -prerelease -products * -property installationPath`) do set " VSINSTALL = %%i "
120+ if not defined VSINSTALL (
121+ echo Error: vswhere.exe reported no Visual Studio installation.
122+ exit /b 1
123+ )
124+ set " VCVARSALL = %VSINSTALL% \VC\Auxiliary\Build\vcvarsall.bat"
125+ if not exist " %VCVARSALL% " (
126+ echo Error: no VC\Auxiliary\Build\vcvarsall.bat under " %VSINSTALL% " .
127+ exit /b 1
128+ )
129+ echo Using Visual Studio at " %VSINSTALL% "
130+ CALL " %VCVARSALL% " arm64
131+ if errorlevel 1 (
132+ echo Error: " %VCVARSALL% " arm64 failed.
133+ exit /b 1
134+ )
135+ where mt.exe > NUL 2 >& 1
136+ if errorlevel 1 (
137+ echo Error: mt.exe is not on PATH after vcvarsall; CMake will fail with
138+ echo CMAKE_MT-NOTFOUND. The Windows SDK component may be missing.
139+ exit /b 1
140+ )
100141
101142REM Prefer LLVM flang
102143PATH=C:\Program Files\LLVM\bin;%PATH%
0 commit comments