Skip to content

Commit 985ffc6

Browse files
committed
update windows to vs2026
1 parent 4ba10cc commit 985ffc6

2 files changed

Lines changed: 47 additions & 5 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## OpenBLAS v0.3.34 (v0.3.34)
22

3-
### 0.3.34.237.1 (2026-10-08)
3+
### 0.3.34.237.1 (2026-10-09)
44

55
- Build every manylinux and musllinux wheel without a runtime dependency on
66
libgfortran, and therefore without libquadmath, which is only ever pulled in
@@ -12,6 +12,7 @@
1212
is unchanged for now (ld64 has no -Wl,--exclude-libs), and Windows already
1313
static-links libgfortran. A toolchain that cannot support it falls back to
1414
linking libgfortran as before.
15+
= Update windows devstudio 2022 to 2026
1516

1617

1718
### 0.3.34.237.0 (2026-09-06)

‎tools/build_steps_win_arm64.bat‎

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ REM sed -e "s/^VERSION = .*/VERSION = ${version}/" -i.bak Makefile.rule
8080

8181
for /f "tokens=3 delims= " %%v in ('findstr /b "version = " ..\pyproject.toml') do set version=%%v
8282
set 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

8588
REM Set suffixed-ILP64 flags
8689
if "%if_bits%"=="64" (
@@ -94,9 +97,47 @@ if exist build (rmdir /S /Q build || exit /b 1)
9497
mkdir build || exit /b 1 & cd build || exit /b 1
9598

9699
echo 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

101142
REM Prefer LLVM flang
102143
PATH=C:\Program Files\LLVM\bin;%PATH%

0 commit comments

Comments
 (0)