Files
Hiroshi SHIBATAandClaude Opus 5.5 b0e813f4cc win32: Detect only vcruntime in rtname.cmd
MSVC 1915 or later is required and Makefile.sub rejects RT_VER below 140, so the values made for msvcrt and msvcrNN only led to that error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 11:36:18 +09:00

32 lines
671 B
Batchfile
Executable File

@echo off
@setlocal EnableExtensions DisableDelayedExpansion || exit /b -1
set rt=
set rtver=
set osver=
for /f "usebackq" %%I in (`
dumpbin -dependents %1 ^|
findstr -r -i -c:"\<vcruntime.*\.dll$"
`) do (
set rt=%%~nI
)
for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do @(
::- downcase
call set rt=%%rt:%%i=%%i%%
)
if "%rt:~0,9%" == "vcruntime" (
call set rtver=%%rt:vcruntime=%%
call set osver=_%%rtver%%
) else (
(echo %0: %1 is not linked to vcruntime) 1>&2
exit 1
)
for %%I in (
"PLATFORM = $(TARGET_OS)%osver%"
"RT = %rt%"
"RT_VER = %rtver%"
) do @(
echo %%~I
)