11@ rem Script to build LuaJIT with MSVC.
2- @ rem Copyright (C) 2005-2023 Mike Pall. See Copyright Notice in luajit.h
2+ @ rem Copyright (C) 2005-2025 Mike Pall. See Copyright Notice in luajit.h
33@ rem
44@ rem Open a "Visual Studio Command Prompt" (either x86 or x64).
55@ rem Then cd to this directory and run this script. Use the following
@@ -112,7 +112,7 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c
112112@ if " %1 " == " static" goto :STATIC
113113%LJCOMPILE% %LJDYNBUILD% lj_*.c lib_*.c
114114@ if errorlevel 1 goto :BAD
115- %LJLINK% /DLL /out :%LJDLLNAME% lj_*.obj lib_*.obj
115+ %LJLINK% /DLL /OUT :%LJDLLNAME% lj_*.obj lib_*.obj
116116@ if errorlevel 1 goto :BAD
117117@ goto :MTDLL
118118:STATIC
@@ -122,17 +122,24 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c
122122@ if errorlevel 1 goto :BAD
123123@ goto :MTDLL
124124:AMALGDLL
125+ @ if " %2 " == " static" goto :AMALGSTATIC
125126%LJCOMPILE% %LJDYNBUILD% ljamalg.c
126127@ if errorlevel 1 goto :BAD
127- %LJLINK% /DLL /out:%LJDLLNAME% ljamalg.obj lj_vm.obj
128+ %LJLINK% /DLL /OUT:%LJDLLNAME% ljamalg.obj lj_vm.obj
129+ @ if errorlevel 1 goto :BAD
130+ @ goto :MTDLL
131+ :AMALGSTATIC
132+ %LJCOMPILE% ljamalg.c
133+ @ if errorlevel 1 goto :BAD
134+ %LJLINK% /OUT:%LJDLLNAME% ljamalg.obj lj_vm.obj
128135@ if errorlevel 1 goto :BAD
129136:MTDLL
130137if exist %LJDLLNAME% .manifest^
131138 %LJMT% -manifest %LJDLLNAME% .manifest -outputresource:%LJDLLNAME% ;2
132139
133140%LJCOMPILE% luajit.c
134141@ if errorlevel 1 goto :BAD
135- %LJLINK% /out :luajit.exe luajit.obj %LJLIBNAME%
142+ %LJLINK% /OUT :luajit.exe luajit.obj %LJLIBNAME%
136143@ if errorlevel 1 goto :BAD
137144if exist luajit.exe.manifest^
138145 %LJMT% -manifest luajit.exe.manifest -outputresource:luajit.exe
0 commit comments