aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2025-03-09 21:05:06 +0100
committerMike Pall <mike>2025-03-09 21:05:06 +0100
commit4219efae43f9fc600554c3f7d07f47374e03a391 (patch)
treea2e6effb64c2081985de5626afbcc9b08025448f /src
parent0254770582a1886548bac10fd835bcf997a9ebf6 (diff)
downloadluajit-4219efae43f9fc600554c3f7d07f47374e03a391.tar.gz
luajit-4219efae43f9fc600554c3f7d07f47374e03a391.tar.bz2
luajit-4219efae43f9fc600554c3f7d07f47374e03a391.zip
Windows: Allow mixed builds with msvcbuild.bat.
Suggested by alex4814. #1341
Diffstat (limited to 'src')
-rw-r--r--src/msvcbuild.bat9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat
index fa30d11d..69c0c61a 100644
--- a/src/msvcbuild.bat
+++ b/src/msvcbuild.bat
@@ -8,7 +8,8 @@
8@rem nogc64 disable LJ_GC64 mode for x64 8@rem nogc64 disable LJ_GC64 mode for x64
9@rem debug emit debug symbols 9@rem debug emit debug symbols
10@rem amalg amalgamated build 10@rem amalg amalgamated build
11@rem static static linkage 11@rem static create static lib to statically link into your project
12@rem mixed create static lib to build a DLL in your project
12 13
13@if not defined INCLUDE goto :FAIL 14@if not defined INCLUDE goto :FAIL
14 15
@@ -106,12 +107,14 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c
106@if "%1"=="static" goto :STATIC 107@if "%1"=="static" goto :STATIC
107%LJCOMPILE% %LJDYNBUILD% lj_*.c lib_*.c 108%LJCOMPILE% %LJDYNBUILD% lj_*.c lib_*.c
108@if errorlevel 1 goto :BAD 109@if errorlevel 1 goto :BAD
110@if "%1"=="mixed" goto :STATICLIB
109%LJLINK% /DLL /OUT:%LJDLLNAME% lj_*.obj lib_*.obj 111%LJLINK% /DLL /OUT:%LJDLLNAME% lj_*.obj lib_*.obj
110@if errorlevel 1 goto :BAD 112@if errorlevel 1 goto :BAD
111@goto :MTDLL 113@goto :MTDLL
112:STATIC 114:STATIC
113%LJCOMPILE% lj_*.c lib_*.c 115%LJCOMPILE% lj_*.c lib_*.c
114@if errorlevel 1 goto :BAD 116@if errorlevel 1 goto :BAD
117:STATICLIB
115%LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj 118%LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj
116@if errorlevel 1 goto :BAD 119@if errorlevel 1 goto :BAD
117@goto :MTDLL 120@goto :MTDLL
@@ -119,13 +122,15 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c
119@if "%2"=="static" goto :AMALGSTATIC 122@if "%2"=="static" goto :AMALGSTATIC
120%LJCOMPILE% %LJDYNBUILD% ljamalg.c 123%LJCOMPILE% %LJDYNBUILD% ljamalg.c
121@if errorlevel 1 goto :BAD 124@if errorlevel 1 goto :BAD
125@if "%2"=="mixed" goto :AMALGSTATICLIB
122%LJLINK% /DLL /OUT:%LJDLLNAME% ljamalg.obj lj_vm.obj 126%LJLINK% /DLL /OUT:%LJDLLNAME% ljamalg.obj lj_vm.obj
123@if errorlevel 1 goto :BAD 127@if errorlevel 1 goto :BAD
124@goto :MTDLL 128@goto :MTDLL
125:AMALGSTATIC 129:AMALGSTATIC
126%LJCOMPILE% ljamalg.c 130%LJCOMPILE% ljamalg.c
127@if errorlevel 1 goto :BAD 131@if errorlevel 1 goto :BAD
128%LJLINK% /OUT:%LJDLLNAME% ljamalg.obj lj_vm.obj 132:AMALGSTATICLIB
133%LJLIB% /OUT:%LJLIBNAME% ljamalg.obj lj_vm.obj
129@if errorlevel 1 goto :BAD 134@if errorlevel 1 goto :BAD
130:MTDLL 135:MTDLL
131if exist %LJDLLNAME%.manifest^ 136if exist %LJDLLNAME%.manifest^