vcpkg/ports/luajit/001-fixStaticBuild.patch

27 lines
887 B
Diff
Raw Normal View History

2017-07-08 05:21:40 +08:00
diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat
2017-07-24 02:43:57 +08:00
index bd0c4c5..95e1cf4 100644
2017-07-08 05:21:40 +08:00
--- a/src/msvcbuild.bat
+++ b/src/msvcbuild.bat
2017-07-24 02:43:57 +08:00
@@ -67,15 +67,20 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c
2017-07-08 05:21:40 +08:00
@shift
@set LJCOMPILE=%LJCOMPILE% /Zi
@set LJLINK=%LJLINK% /debug
+@set DEBUG=1
:NODEBUG
@if "%1"=="amalg" goto :AMALGDLL
@if "%1"=="static" goto :STATIC
2017-07-22 16:05:36 +08:00
-%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL lj_*.c lib_*.c
+@if "%DEBUG%"=="1" set LJCOMPILE=%LJCOMPILE% /MDd
+@if "%DEBUG%"=="" set LJCOMPILE=%LJCOMPILE% /MD
+%LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c
@if errorlevel 1 goto :BAD
%LJLINK% /DLL /out:%LJDLLNAME% lj_*.obj lib_*.obj
2017-07-08 05:21:40 +08:00
@if errorlevel 1 goto :BAD
@goto :MTDLL
:STATIC
+@if "%DEBUG%"=="1" set LJCOMPILE=%LJCOMPILE% /MTd
2017-07-22 16:05:36 +08:00
+@if "%DEBUG%"=="" set LJCOMPILE=%LJCOMPILE% /MT
2017-07-08 05:21:40 +08:00
%LJCOMPILE% lj_*.c lib_*.c
@if errorlevel 1 goto :BAD
2017-07-24 02:43:57 +08:00
%LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj