mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
Update MSVC build script and docs.
This commit is contained in:
parent
3ece3a3e3a
commit
c6c6e3b416
@ -114,14 +114,14 @@ operating systems, CPUs and compilers:
|
|||||||
<td class="compatos">GCC 4.x+<br>GCC 3.4</td>
|
<td class="compatos">GCC 4.x+<br>GCC 3.4</td>
|
||||||
<td class="compatos">GCC 4.x+<br>GCC 3.4</td>
|
<td class="compatos">GCC 4.x+<br>GCC 3.4</td>
|
||||||
<td class="compatos">XCode 5.0+<br>Clang</td>
|
<td class="compatos">XCode 5.0+<br>Clang</td>
|
||||||
<td class="compatos">MSVC, MSVC/EE<br>WinSDK<br>MinGW, Cygwin</td>
|
<td class="compatos">MSVC<br>MinGW, Cygwin</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td class="compatcpu">x64 (64 bit)</td>
|
<td class="compatcpu">x64 (64 bit)</td>
|
||||||
<td class="compatos">GCC 4.x+</td>
|
<td class="compatos">GCC 4.x+</td>
|
||||||
<td class="compatos">ORBIS (<a href="#ps4">PS4</a>)</td>
|
<td class="compatos">ORBIS (<a href="#ps4">PS4</a>)</td>
|
||||||
<td class="compatos">XCode 5.0+<br>Clang</td>
|
<td class="compatos">XCode 5.0+<br>Clang</td>
|
||||||
<td class="compatos">MSVC + SDK v7.0<br>WinSDK v7.0</td>
|
<td class="compatos">MSVC</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td class="compatcpu"><a href="#cross2">ARMv5+<br>ARM9E+</a></td>
|
<td class="compatcpu"><a href="#cross2">ARMv5+<br>ARM9E+</a></td>
|
||||||
@ -166,7 +166,7 @@ only).</li>
|
|||||||
<li><tt>src/Makefile</tt> has settings for <b>compiling</b> LuaJIT
|
<li><tt>src/Makefile</tt> has settings for <b>compiling</b> LuaJIT
|
||||||
under POSIX, MinGW or Cygwin.</li>
|
under POSIX, MinGW or Cygwin.</li>
|
||||||
<li><tt>src/msvcbuild.bat</tt> has settings for compiling LuaJIT with
|
<li><tt>src/msvcbuild.bat</tt> has settings for compiling LuaJIT with
|
||||||
MSVC or WinSDK.</li>
|
MSVC (Visual Studio).</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
Please read the instructions given in these files, before changing
|
Please read the instructions given in these files, before changing
|
||||||
@ -243,17 +243,7 @@ Either install one of the open source SDKs
|
|||||||
(<a href="http://mingw.org/"><span class="ext">»</span> MinGW</a> or
|
(<a href="http://mingw.org/"><span class="ext">»</span> MinGW</a> or
|
||||||
<a href="http://www.cygwin.com/"><span class="ext">»</span> Cygwin</a>), which come with a modified
|
<a href="http://www.cygwin.com/"><span class="ext">»</span> Cygwin</a>), which come with a modified
|
||||||
GCC plus the required development headers.
|
GCC plus the required development headers.
|
||||||
</p>
|
Or install Microsoft's Visual Studio (MSVC).
|
||||||
<p>
|
|
||||||
Or install Microsoft's Visual C++ (MSVC). The freely downloadable
|
|
||||||
<a href="http://www.microsoft.com/Express/VC/"><span class="ext">»</span> Express Edition</a>
|
|
||||||
works just fine, but only contains an x86 compiler.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The freely downloadable
|
|
||||||
<a href="http://msdn.microsoft.com/en-us/windowsserver/bb980924.aspx"><span class="ext">»</span> Windows SDK</a>
|
|
||||||
only comes with command line tools, but this is all you need to build LuaJIT.
|
|
||||||
It contains x86 and x64 compilers.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Next, download the source package and unpack it using an archive manager
|
Next, download the source package and unpack it using an archive manager
|
||||||
@ -261,7 +251,7 @@ Next, download the source package and unpack it using an archive manager
|
|||||||
</p>
|
</p>
|
||||||
<h3>Building with MSVC</h3>
|
<h3>Building with MSVC</h3>
|
||||||
<p>
|
<p>
|
||||||
Open a "Visual Studio .NET Command Prompt", <tt>cd</tt> to the
|
Open a "Visual Studio Command Prompt" (either x86 or x64), <tt>cd</tt> to the
|
||||||
directory where you've unpacked the sources and run these commands:
|
directory where you've unpacked the sources and run these commands:
|
||||||
</p>
|
</p>
|
||||||
<pre class="code">
|
<pre class="code">
|
||||||
@ -269,30 +259,7 @@ cd src
|
|||||||
msvcbuild
|
msvcbuild
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
Then follow the installation instructions below.
|
Check the <tt>msvcbuild.bat</tt> file for more options.
|
||||||
</p>
|
|
||||||
<h3>Building with the Windows SDK</h3>
|
|
||||||
<p>
|
|
||||||
Open a "Windows SDK Command Shell" and select the x86 compiler:
|
|
||||||
</p>
|
|
||||||
<pre class="code">
|
|
||||||
setenv /release /x86
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
Or select the x64 compiler:
|
|
||||||
</p>
|
|
||||||
<pre class="code">
|
|
||||||
setenv /release /x64
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
Then <tt>cd</tt> to the directory where you've unpacked the sources
|
|
||||||
and run these commands:
|
|
||||||
</p>
|
|
||||||
<pre class="code">
|
|
||||||
cd src
|
|
||||||
msvcbuild
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
Then follow the installation instructions below.
|
Then follow the installation instructions below.
|
||||||
</p>
|
</p>
|
||||||
<h3>Building with MinGW or Cygwin</h3>
|
<h3>Building with MinGW or Cygwin</h3>
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
@rem Script to build LuaJIT with MSVC.
|
@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
|
||||||
@rem Either open a "Visual Studio .NET Command Prompt"
|
@rem Open a "Visual Studio Command Prompt" (either x86 or x64).
|
||||||
@rem (Note that the Express Edition does not contain an x64 compiler)
|
@rem Then cd to this directory and run this script. Use the following
|
||||||
@rem -or-
|
@rem options (in order), if needed. The default is a dynamic release build.
|
||||||
@rem Open a "Windows SDK Command Shell" and set the compiler environment:
|
|
||||||
@rem setenv /release /x86
|
|
||||||
@rem -or-
|
|
||||||
@rem setenv /release /x64
|
|
||||||
@rem
|
@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
|
@if not defined INCLUDE goto :FAIL
|
||||||
|
|
||||||
@setlocal
|
@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 LJCOMPILE=cl /nologo /c /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_STDIO_INLINE=__declspec(dllexport)__inline
|
||||||
@set LJLINK=link /nologo
|
@set LJLINK=link /nologo
|
||||||
@set LJMT=mt /nologo
|
@set LJMT=mt /nologo
|
||||||
@ -22,6 +22,7 @@
|
|||||||
@set DASM=%DASMDIR%\dynasm.lua
|
@set DASM=%DASMDIR%\dynasm.lua
|
||||||
@set LJDLLNAME=lua51.dll
|
@set LJDLLNAME=lua51.dll
|
||||||
@set LJLIBNAME=lua51.lib
|
@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
|
@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
|
%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
|
@if "%1" neq "debug" goto :NODEBUG
|
||||||
@shift
|
@shift
|
||||||
@set LJCOMPILE=%LJCOMPILE% /Zi
|
@set BUILDTYPE=debug
|
||||||
@set LJLINK=%LJLINK% /debug
|
@set LJCOMPILE=%LJCOMPILE% /Zi %DEBUGCFLAGS%
|
||||||
:NODEBUG
|
:NODEBUG
|
||||||
|
@set LJLINK=%LJLINK% /%BUILDTYPE%
|
||||||
@if "%1"=="amalg" goto :AMALGDLL
|
@if "%1"=="amalg" goto :AMALGDLL
|
||||||
@if "%1"=="static" goto :STATIC
|
@if "%1"=="static" goto :STATIC
|
||||||
%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL lj_*.c lib_*.c
|
%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL lj_*.c lib_*.c
|
||||||
@ -111,5 +113,5 @@ if exist luajit.exe.manifest^
|
|||||||
@echo *******************************************************
|
@echo *******************************************************
|
||||||
@goto :END
|
@goto :END
|
||||||
:FAIL
|
: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
|
:END
|
||||||
|
Loading…
Reference in New Issue
Block a user