diff options
| author | Mike Pall <mike> | 2019-12-08 18:58:50 +0100 |
|---|---|---|
| committer | Mike Pall <mike> | 2019-12-08 18:58:50 +0100 |
| commit | 6e228a9cb68887153462365b70d54b2fff871050 (patch) | |
| tree | 3f17b8f2fa6a41383345f84b99da31408b67e95e /src | |
| parent | e45b04f49953b4e0cc2b3cec4dbe4c2c0a2656f3 (diff) | |
| parent | c6c6e3b416635a528a711ed1986b054287a7c491 (diff) | |
| download | luajit-6e228a9cb68887153462365b70d54b2fff871050.tar.gz luajit-6e228a9cb68887153462365b70d54b2fff871050.tar.bz2 luajit-6e228a9cb68887153462365b70d54b2fff871050.zip | |
Merge branch 'master' into v2.1
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_def.h | 4 | ||||
| -rw-r--r-- | src/msvcbuild.bat | 27 |
2 files changed, 17 insertions, 14 deletions
diff --git a/src/lj_def.h b/src/lj_def.h index e67bb24c..b1208f6b 100644 --- a/src/lj_def.h +++ b/src/lj_def.h | |||
| @@ -8,8 +8,8 @@ | |||
| 8 | 8 | ||
| 9 | #include "lua.h" | 9 | #include "lua.h" |
| 10 | 10 | ||
| 11 | #if defined(_MSC_VER) | 11 | #if defined(_MSC_VER) && (_MSC_VER < 1700) |
| 12 | /* MSVC is stuck in the last century and doesn't have C99's stdint.h. */ | 12 | /* Old MSVC is stuck in the last century and doesn't have C99's stdint.h. */ |
| 13 | typedef __int8 int8_t; | 13 | typedef __int8 int8_t; |
| 14 | typedef __int16 int16_t; | 14 | typedef __int16 int16_t; |
| 15 | typedef __int32 int32_t; | 15 | typedef __int32 int32_t; |
diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat index 71bde759..4abc461a 100644 --- a/src/msvcbuild.bat +++ b/src/msvcbuild.bat | |||
| @@ -1,19 +1,19 @@ | |||
| 1 | @rem Script to build LuaJIT with MSVC. | 1 | @rem Script to build LuaJIT with MSVC. |
| 2 | @rem Copyright (C) 2005-2017 Mike Pall. See Copyright Notice in luajit.h | 2 | @rem Copyright (C) 2005-2019 Mike Pall. See Copyright Notice in luajit.h |
| 3 | @rem | 3 | @rem |
| 4 | @rem Either open a "Visual Studio .NET Command Prompt" | 4 | @rem Open a "Visual Studio Command Prompt" (either x86 or x64). |
| 5 | @rem (Note that the Express Edition does not contain an x64 compiler) | 5 | @rem Then cd to this directory and run this script. Use the following |
| 6 | @rem -or- | 6 | @rem options (in order), if needed. The default is a dynamic release build. |
| 7 | @rem Open a "Windows SDK Command Shell" and set the compiler environment: | ||
| 8 | @rem setenv /release /x86 | ||
| 9 | @rem -or- | ||
| 10 | @rem setenv /release /x64 | ||
| 11 | @rem | 7 | @rem |
| 12 | @rem Then cd to this directory and run this script. | 8 | @rem debug emit debug symbols |
| 9 | @rem amalg amalgamated build | ||
| 10 | @rem static static linkage | ||
| 13 | 11 | ||
| 14 | @if not defined INCLUDE goto :FAIL | 12 | @if not defined INCLUDE goto :FAIL |
| 15 | 13 | ||
| 16 | @setlocal | 14 | @setlocal |
| 15 | @rem Add more debug flags here, e.g. DEBUGCFLAGS=/DLUA_USE_APICHECK | ||
| 16 | @set DEBUGCFLAGS= | ||
| 17 | @set LJCOMPILE=cl /nologo /c /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_STDIO_INLINE=__declspec(dllexport)__inline | 17 | @set LJCOMPILE=cl /nologo /c /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_STDIO_INLINE=__declspec(dllexport)__inline |
| 18 | @set LJLINK=link /nologo | 18 | @set LJLINK=link /nologo |
| 19 | @set LJMT=mt /nologo | 19 | @set LJMT=mt /nologo |
| @@ -23,6 +23,7 @@ | |||
| 23 | @set DASC=vm_x86.dasc | 23 | @set DASC=vm_x86.dasc |
| 24 | @set LJDLLNAME=lua51.dll | 24 | @set LJDLLNAME=lua51.dll |
| 25 | @set LJLIBNAME=lua51.lib | 25 | @set LJLIBNAME=lua51.lib |
| 26 | @set BUILDTYPE=release | ||
| 26 | @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 | 27 | @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 |
| 27 | 28 | ||
| 28 | %LJCOMPILE% host\minilua.c | 29 | %LJCOMPILE% host\minilua.c |
| @@ -72,9 +73,11 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c | |||
| 72 | 73 | ||
| 73 | @if "%1" neq "debug" goto :NODEBUG | 74 | @if "%1" neq "debug" goto :NODEBUG |
| 74 | @shift | 75 | @shift |
| 75 | @set LJCOMPILE=%LJCOMPILE% /Zi | 76 | @set BUILDTYPE=debug |
| 76 | @set LJLINK=%LJLINK% /debug /opt:ref /opt:icf /incremental:no | 77 | @set LJCOMPILE=%LJCOMPILE% /Zi %DEBUGCFLAGS% |
| 78 | @set LJLINK=%LJLINK% /opt:ref /opt:icf /incremental:no | ||
| 77 | :NODEBUG | 79 | :NODEBUG |
| 80 | @set LJLINK=%LJLINK% /%BUILDTYPE% | ||
| 78 | @if "%1"=="amalg" goto :AMALGDLL | 81 | @if "%1"=="amalg" goto :AMALGDLL |
| 79 | @if "%1"=="static" goto :STATIC | 82 | @if "%1"=="static" goto :STATIC |
| 80 | %LJCOMPILE% /MD /DLUA_BUILD_AS_DLL lj_*.c lib_*.c | 83 | %LJCOMPILE% /MD /DLUA_BUILD_AS_DLL lj_*.c lib_*.c |
| @@ -118,5 +121,5 @@ if exist luajit.exe.manifest^ | |||
| 118 | @echo ******************************************************* | 121 | @echo ******************************************************* |
| 119 | @goto :END | 122 | @goto :END |
| 120 | :FAIL | 123 | :FAIL |
| 121 | @echo You must open a "Visual Studio .NET Command Prompt" to run this script | 124 | @echo You must open a "Visual Studio Command Prompt" to run this script |
| 122 | :END | 125 | :END |
