summaryrefslogtreecommitdiff
path: root/win32/rtname.cmd
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-12 07:12:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-12 07:12:49 +0000
commit8d816aef2e8eecd805193398ad00b604ce424d6c (patch)
tree9a84d247c345fae2c0f326f9739cd288b4496568 /win32/rtname.cmd
parent9f7717e836e9e26a70df886e4fea13bc6be5d434 (diff)
setup.mak: -runtime-
* win32/setup.mak (-runtime-): see msvcrt from link header on mswin instead of running testing executable file, for cross compiling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/rtname.cmd')
-rw-r--r--win32/rtname.cmd18
1 files changed, 18 insertions, 0 deletions
diff --git a/win32/rtname.cmd b/win32/rtname.cmd
new file mode 100644
index 0000000..1f410a0
--- /dev/null
+++ b/win32/rtname.cmd
@@ -0,0 +1,18 @@
+@echo off
+set rt=
+set rtver=
+set osver=
+for /f "usebackq" %%I in (`dumpbin -dependents %1 ^| findstr -r -i "\<msvcr.*\.dll$"`) do set rt=%%~nI
+if "%rt%" == "" (
+ (echo %0: %1 is not linked to msvcrt) 1>&2
+ exit 1
+)
+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 @call set rt=%%rt:%%i=%%i%%
+if "%rt%" == "msvcrt" (
+ call set rtver=60
+) else (
+ call set rtver=%%rt:msvcr=%%
+ call set rt=msvcr%%rtver%%
+ call set osver=_%%rtver%%
+)
+for %%I in ("PLATFORM = $(TARGET_OS)%osver%" "RT = %rt%" "RT_VER = %rtver%") do @echo %%~I