mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
LJ_GC64: Add build options and install instructions.
This commit is contained in:
parent
c198167690
commit
c94b921f92
@ -210,7 +210,8 @@ bytecode (e.g. from Lua 5.1) is incompatible and cannot be loaded.
|
|||||||
<p>
|
<p>
|
||||||
Note: <tt>LJ_GC64</tt> mode requires a different frame layout, which implies
|
Note: <tt>LJ_GC64</tt> mode requires a different frame layout, which implies
|
||||||
a different, incompatible bytecode format for ports that use this mode (e.g.
|
a different, incompatible bytecode format for ports that use this mode (e.g.
|
||||||
ARM64). This may be rectified in the future.
|
ARM64 or MIPS64) or when explicitly enabled for x64. This may be rectified
|
||||||
|
in the future.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3 id="table_new"><tt>table.new(narray, nhash)</tt> allocates a pre-sized table</h3>
|
<h3 id="table_new"><tt>table.new(narray, nhash)</tt> allocates a pre-sized table</h3>
|
||||||
|
@ -175,6 +175,14 @@ MSVC or WinSDK.</li>
|
|||||||
Please read the instructions given in these files, before changing
|
Please read the instructions given in these files, before changing
|
||||||
any settings.
|
any settings.
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
LuaJIT on x64 currently uses 32 bit GC objects by default.
|
||||||
|
<tt>LJ_GC64</tt> mode may be explicitly enabled:
|
||||||
|
add <tt>XCFLAGS=-DLUAJIT_ENABLE_GC64</tt> to the make command or run
|
||||||
|
<tt>msvcbuild gc64</tt> for MSVC/WinSDK. Please check the note
|
||||||
|
about the <a href="extensions.html#string_dump">bytecode format</a>
|
||||||
|
differences, too.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h2 id="posix">POSIX Systems (Linux, OSX, *BSD etc.)</h2>
|
<h2 id="posix">POSIX Systems (Linux, OSX, *BSD etc.)</h2>
|
||||||
<h3>Prerequisites</h3>
|
<h3>Prerequisites</h3>
|
||||||
@ -584,14 +592,11 @@ intend to load Lua/C modules at runtime.
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
If you're building a 64 bit application on OSX which links directly or
|
If you're building a 64 bit application on OSX which links directly or
|
||||||
indirectly against LuaJIT, you need to link your main executable
|
indirectly against LuaJIT which is not built for <tt>LJ_GC64</tt> mode,
|
||||||
with these flags:
|
you need to link your main executable with these flags:
|
||||||
<pre class="code">
|
<pre class="code">
|
||||||
-pagezero_size 10000 -image_base 100000000
|
-pagezero_size 10000 -image_base 100000000
|
||||||
</pre>
|
</pre>
|
||||||
Also, it's recommended to <tt>rebase</tt> all (self-compiled) shared libraries
|
|
||||||
which are loaded at runtime on OSX/x64 (e.g. C extension modules for Lua).
|
|
||||||
See: <tt>man rebase</tt>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Additional hints for initializing LuaJIT using the C API functions:</p>
|
<p>Additional hints for initializing LuaJIT using the C API functions:</p>
|
||||||
|
@ -110,6 +110,9 @@ XCFLAGS=
|
|||||||
#XCFLAGS+= -DLUAJIT_NUMMODE=1
|
#XCFLAGS+= -DLUAJIT_NUMMODE=1
|
||||||
#XCFLAGS+= -DLUAJIT_NUMMODE=2
|
#XCFLAGS+= -DLUAJIT_NUMMODE=2
|
||||||
#
|
#
|
||||||
|
# Enable GC64 mode for x64.
|
||||||
|
#XCFLAGS+= -DLUAJIT_ENABLE_GC64
|
||||||
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
@set LJLIB=lib /nologo /nodefaultlib
|
@set LJLIB=lib /nologo /nodefaultlib
|
||||||
@set DASMDIR=..\dynasm
|
@set DASMDIR=..\dynasm
|
||||||
@set DASM=%DASMDIR%\dynasm.lua
|
@set DASM=%DASMDIR%\dynasm.lua
|
||||||
|
@set DASC=vm_x86.dasc
|
||||||
@set LJDLLNAME=lua51.dll
|
@set LJDLLNAME=lua51.dll
|
||||||
@set LJLIBNAME=lua51.lib
|
@set LJLIBNAME=lua51.lib
|
||||||
@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
|
||||||
@ -39,7 +40,12 @@ if exist minilua.exe.manifest^
|
|||||||
@set LJARCH=x86
|
@set LJARCH=x86
|
||||||
@set LJCOMPILE=%LJCOMPILE% /arch:SSE2
|
@set LJCOMPILE=%LJCOMPILE% /arch:SSE2
|
||||||
:X64
|
:X64
|
||||||
minilua %DASM% -LN %DASMFLAGS% -o host\buildvm_arch.h vm_x86.dasc
|
@if "%1" neq "gc64" goto :NOGC64
|
||||||
|
@shift
|
||||||
|
@set DASC=vm_x64.dasc
|
||||||
|
@set LJCOMPILE=%LJCOMPILE% /DLUAJIT_ENABLE_GC64
|
||||||
|
:NOGC64
|
||||||
|
minilua %DASM% -LN %DASMFLAGS% -o host\buildvm_arch.h %DASC%
|
||||||
@if errorlevel 1 goto :BAD
|
@if errorlevel 1 goto :BAD
|
||||||
|
|
||||||
%LJCOMPILE% /I "." /I %DASMDIR% host\buildvm*.c
|
%LJCOMPILE% /I "." /I %DASMDIR% host\buildvm*.c
|
||||||
|
Loading…
Reference in New Issue
Block a user