mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 07:34:07 +00:00
Pass various build, arch and OS flags to DynASM.
This commit is contained in:
parent
d5a915ccf5
commit
e496a502b0
43
src/Makefile
43
src/Makefile
@ -249,12 +249,12 @@ endif
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(findstring __CELLOS_LV2__ ,$(TARGET_TESTARCH)))
|
ifneq (,$(findstring LJ_TARGET_PS3 1,$(TARGET_TESTARCH)))
|
||||||
TARGET_SYS= PS3
|
TARGET_SYS= PS3
|
||||||
TARGET_ARCH+= -D__CELLOS_LV2__
|
TARGET_ARCH+= -D__CELLOS_LV2__
|
||||||
TARGET_XCFLAGS+= -DLUAJIT_USE_SYSMALLOC
|
TARGET_XCFLAGS+= -DLUAJIT_USE_SYSMALLOC
|
||||||
endif
|
endif
|
||||||
ifneq (,$(findstring LJ_NO_UNWIND ,$(TARGET_TESTARCH)))
|
ifneq (,$(findstring LJ_NO_UNWIND 1,$(TARGET_TESTARCH)))
|
||||||
TARGET_ARCH+= -DLUAJIT_NO_UNWIND
|
TARGET_ARCH+= -DLUAJIT_NO_UNWIND
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -377,12 +377,45 @@ DASM_XFLAGS=
|
|||||||
DASM_AFLAGS=
|
DASM_AFLAGS=
|
||||||
DASM_ARCH= $(TARGET_LJARCH)
|
DASM_ARCH= $(TARGET_LJARCH)
|
||||||
|
|
||||||
ifeq (x64,$(TARGET_LJARCH))
|
ifneq (,$(findstring LJ_HASJIT 1,$(TARGET_TESTARCH)))
|
||||||
DASM_ARCH= x86
|
DASM_AFLAGS+= -D JIT
|
||||||
|
endif
|
||||||
|
ifneq (,$(findstring LJ_HASFFI 1,$(TARGET_TESTARCH)))
|
||||||
|
DASM_AFLAGS+= -D FFI
|
||||||
|
endif
|
||||||
|
ifneq (,$(findstring LJ_DUALNUM 1,$(TARGET_TESTARCH)))
|
||||||
|
DASM_AFLAGS+= -D DUALNUM
|
||||||
|
endif
|
||||||
|
ifneq (,$(findstring LJ_ARCH_HASFPU 1,$(TARGET_TESTARCH)))
|
||||||
|
DASM_AFLAGS+= -D FPU
|
||||||
|
endif
|
||||||
|
ifeq (,$(findstring LJ_ABI_SOFTFP 1,$(TARGET_TESTARCH)))
|
||||||
|
DASM_AFLAGS+= -D HF
|
||||||
|
endif
|
||||||
|
DASM_AFLAGS+= -D VER=$(subst LJ_ARCH_VERSION_,,$(filter LJ_ARCH_VERSION_%,$(subst LJ_ARCH_VERSION ,LJ_ARCH_VERSION_,$(TARGET_TESTARCH))))
|
||||||
ifeq (Windows,$(TARGET_SYS))
|
ifeq (Windows,$(TARGET_SYS))
|
||||||
DASM_AFLAGS+= -D X64 -D X64WIN
|
DASM_AFLAGS+= -D WIN
|
||||||
|
endif
|
||||||
|
ifeq (x86,$(TARGET_LJARCH))
|
||||||
|
ifneq (,$(findstring __SSE2__ 1,$(TARGET_TESTARCH)))
|
||||||
|
DASM_AFLAGS+= -D SSE
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
|
ifeq (x64,$(TARGET_LJARCH))
|
||||||
DASM_AFLAGS+= -D X64
|
DASM_AFLAGS+= -D X64
|
||||||
|
DASM_ARCH= x86
|
||||||
|
else
|
||||||
|
ifeq (ppc,$(TARGET_LJARCH))
|
||||||
|
ifneq (,$(findstring LJ_ARCH_SQRT 1,$(TARGET_TESTARCH)))
|
||||||
|
DASM_AFLAGS+= -D SQRT
|
||||||
|
endif
|
||||||
|
ifneq (,$(findstring LJ_ARCH_ROUND 1,$(TARGET_TESTARCH)))
|
||||||
|
DASM_AFLAGS+= -D ROUND
|
||||||
|
endif
|
||||||
|
ifeq (PS3,$(TARGET_SYS))
|
||||||
|
DASM_AFLAGS+= -D PS3
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -29,13 +29,13 @@
|
|||||||
if exist minilua.exe.manifest^
|
if exist minilua.exe.manifest^
|
||||||
%LJMT% -manifest minilua.exe.manifest -outputresource:minilua.exe
|
%LJMT% -manifest minilua.exe.manifest -outputresource:minilua.exe
|
||||||
|
|
||||||
@set DASMFLAGS=-D X64 -D X64WIN
|
@set DASMFLAGS=-D X64 -D WIN
|
||||||
@if defined CPU goto :XCPU
|
@if defined CPU goto :XCPU
|
||||||
@set CPU=%PROCESSOR_ARCHITECTURE%
|
@set CPU=%PROCESSOR_ARCHITECTURE%
|
||||||
:XCPU
|
:XCPU
|
||||||
@if "%CPU%"=="AMD64" goto :X64
|
@if "%CPU%"=="AMD64" goto :X64
|
||||||
@if "%CPU%"=="X64" goto :X64
|
@if "%CPU%"=="X64" goto :X64
|
||||||
@set DASMFLAGS=
|
@set DASMFLAGS=-D WIN
|
||||||
:X64
|
:X64
|
||||||
minilua %DASM% -LN %DASMFLAGS% -o host\buildvm_arch.h vm_x86.dasc
|
minilua %DASM% -LN %DASMFLAGS% -o host\buildvm_arch.h vm_x86.dasc
|
||||||
@if errorlevel 1 goto :BAD
|
@if errorlevel 1 goto :BAD
|
||||||
|
@ -16,6 +16,13 @@
|
|||||||
|
|
|
|
||||||
|//-----------------------------------------------------------------------
|
|//-----------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
|
|.if X64
|
||||||
|
|.define SSE, 1
|
||||||
|
|.if WIN
|
||||||
|
|.define X64WIN, 1
|
||||||
|
|.endif
|
||||||
|
|.endif
|
||||||
|
|
|
||||||
|// Fixed register assignments for the interpreter.
|
|// Fixed register assignments for the interpreter.
|
||||||
|// This is very fragile and has many dependencies. Caveat emptor.
|
|// This is very fragile and has many dependencies. Caveat emptor.
|
||||||
|.define BASE, edx // Not C callee-save, refetched anyway.
|
|.define BASE, edx // Not C callee-save, refetched anyway.
|
||||||
|
Loading…
Reference in New Issue
Block a user