Update MSVC build script and docs.
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
@rem Script to build LuaJIT with MSVC.
|
||||
@rem Copyright (C) 2005-2017 Mike Pall. See Copyright Notice in luajit.h
|
||||
@rem Copyright (C) 2005-2019 Mike Pall. See Copyright Notice in luajit.h
|
||||
@rem
|
||||
@rem Either open a "Visual Studio .NET Command Prompt"
|
||||
@rem (Note that the Express Edition does not contain an x64 compiler)
|
||||
@rem -or-
|
||||
@rem Open a "Windows SDK Command Shell" and set the compiler environment:
|
||||
@rem setenv /release /x86
|
||||
@rem -or-
|
||||
@rem setenv /release /x64
|
||||
@rem Open a "Visual Studio Command Prompt" (either x86 or x64).
|
||||
@rem Then cd to this directory and run this script. Use the following
|
||||
@rem options (in order), if needed. The default is a dynamic release build.
|
||||
@rem
|
||||
@rem Then cd to this directory and run this script.
|
||||
@rem debug emit debug symbols
|
||||
@rem amalg amalgamated build
|
||||
@rem static static linkage
|
||||
|
||||
@if not defined INCLUDE goto :FAIL
|
||||
|
||||
@setlocal
|
||||
@rem Add more debug flags here, e.g. DEBUGCFLAGS=/DLUA_USE_APICHECK
|
||||
@set DEBUGCFLAGS=
|
||||
@set LJCOMPILE=cl /nologo /c /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_STDIO_INLINE=__declspec(dllexport)__inline
|
||||
@set LJLINK=link /nologo
|
||||
@set LJMT=mt /nologo
|
||||
@@ -22,6 +22,7 @@
|
||||
@set DASM=%DASMDIR%\dynasm.lua
|
||||
@set LJDLLNAME=lua51.dll
|
||||
@set LJLIBNAME=lua51.lib
|
||||
@set BUILDTYPE=release
|
||||
@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c
|
||||
|
||||
%LJCOMPILE% host\minilua.c
|
||||
@@ -65,9 +66,10 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c
|
||||
|
||||
@if "%1" neq "debug" goto :NODEBUG
|
||||
@shift
|
||||
@set LJCOMPILE=%LJCOMPILE% /Zi
|
||||
@set LJLINK=%LJLINK% /debug
|
||||
@set BUILDTYPE=debug
|
||||
@set LJCOMPILE=%LJCOMPILE% /Zi %DEBUGCFLAGS%
|
||||
:NODEBUG
|
||||
@set LJLINK=%LJLINK% /%BUILDTYPE%
|
||||
@if "%1"=="amalg" goto :AMALGDLL
|
||||
@if "%1"=="static" goto :STATIC
|
||||
%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL lj_*.c lib_*.c
|
||||
@@ -111,5 +113,5 @@ if exist luajit.exe.manifest^
|
||||
@echo *******************************************************
|
||||
@goto :END
|
||||
:FAIL
|
||||
@echo You must open a "Visual Studio .NET Command Prompt" to run this script
|
||||
@echo You must open a "Visual Studio Command Prompt" to run this script
|
||||
:END
|
||||
|
||||
Reference in New Issue
Block a user