dont compile with bluajit by default
add HAVE_BLUAJIT=1 to compile with it
This commit is contained in:
1 parent
3bead2d9cc
commit
f167a14120
8 files changed
+18
-14
No files matched your search
+7
-3
@@ -64,6 +64,10 @@
|
||||
# DEBUGMODE=1 - Enable various debugging capabilities.
|
||||
# Also disables optimizations.
|
||||
#
|
||||
# Potentially Unsafe
|
||||
# ------------------
|
||||
# HAVE_BLUAJIT=1 - Enable compiling with BluaJIT instead of blua, can have potential bugs
|
||||
#
|
||||
# Development flags:
|
||||
#
|
||||
# VALGRIND=1 - Enable Valgrind memory debugging support.
|
||||
@@ -184,7 +188,7 @@ sources+=\
|
||||
$(call List,Sourcefile)\
|
||||
$(call List,core/Sourcefile)
|
||||
|
||||
ifdef NOBLUAJIT
|
||||
ifndef HAVE_BLUAJIT
|
||||
lualib:=
|
||||
sources+=\
|
||||
$(call List,blua/Sourcefile)
|
||||
@@ -367,7 +371,7 @@ $(dbg) : $(objects) $(lualib) | $$(@D)/
|
||||
$(call Echo,Linking $(@F)...)
|
||||
$(.)$(LD) -o $@ $^ $(libs)
|
||||
|
||||
ifndef NOBLUAJIT
|
||||
ifdef HAVE_BLUAJIT
|
||||
$(lualib) ::
|
||||
@$(MAKE) -C ../libs/bluajit $(MAKECMDGOALS) CCOPT="$(opts)"
|
||||
endif
|
||||
@@ -434,7 +438,7 @@ clean :
|
||||
distclean :
|
||||
$(call _rm,../bin ../objs ../dep ../make comptime.h)
|
||||
|
||||
ifndef NOBLUAJIT
|
||||
ifdef HAVE_BLUAJIT
|
||||
$(call _rm,$(objdir)/buildvm* $(objdir)/minilua* $(objdir)/lj_vm*)
|
||||
|
||||
cleanjit:
|
||||
|
||||
@@ -7,7 +7,7 @@ passthru_opts+=\
|
||||
MOBJCONSISTANCY PACKETDROP ZDEBUG\
|
||||
HAVE_MINIUPNPC\
|
||||
HAVE_DISCORDRPC DEVELOP\
|
||||
NOBLUAJIT
|
||||
HAVE_BLUAJIT
|
||||
|
||||
# build with debugging information
|
||||
ifdef DEBUGMODE
|
||||
|
||||
@@ -26,7 +26,7 @@ ifeq (${DEDICATED},1)
|
||||
EXENAME?=lsrb2kartd
|
||||
endif
|
||||
|
||||
ifndef NOBLUAJIT
|
||||
ifdef HAVE_BLUAJIT
|
||||
libs+=-L../libs/bluajit/src/ -l:libbluajit.a
|
||||
opts+=-I../libs/bluajit/src/
|
||||
endif
|
||||
|
||||
+1
-1
@@ -778,7 +778,7 @@ void D_RegisterServerCommands(void)
|
||||
CV_RegisterVar(&cv_maxdemosize);
|
||||
CV_RegisterVar(&cv_demochangemap);
|
||||
|
||||
#ifndef NOBLUAJIT
|
||||
#ifdef HAVE_BLUAJIT
|
||||
CV_RegisterVar(&cv_luajit);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "lua_hudlib_drawlist.h"
|
||||
#include "lua_hud.h"
|
||||
#ifdef NOBLUAJIT
|
||||
#ifndef HAVE_BLUAJIT
|
||||
#include "blua/lstate.h" // shhhhhh
|
||||
#else
|
||||
#include "lua_script.h"
|
||||
@@ -332,7 +332,7 @@ static UINT64 GetItemId(void)
|
||||
if (!hud_interpolate)
|
||||
return 0;
|
||||
|
||||
#ifdef NOBLUAJIT
|
||||
#ifndef HAVE_BLUAJIT
|
||||
UINT64 id = (uintptr_t)gL->savedpc;
|
||||
#else
|
||||
// he who controls the JIT controls the API
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "doomtype.h"
|
||||
|
||||
#ifdef NOBLUAJIT
|
||||
#ifndef HAVE_BLUAJIT
|
||||
#include "blua/lua.h"
|
||||
#else
|
||||
#include <lua.h>
|
||||
|
||||
+4
-4
@@ -35,7 +35,7 @@
|
||||
|
||||
#include "doomstat.h"
|
||||
|
||||
#ifndef NOBLUAJIT
|
||||
#ifdef HAVE_BLUAJIT
|
||||
#include "d_main.h"
|
||||
#include "i_system.h"
|
||||
static void LuaJit_OnChange(void);
|
||||
@@ -69,7 +69,7 @@ static lua_CFunction liblist[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
#ifndef NOBLUAJIT
|
||||
#ifdef HAVE_BLUAJIT
|
||||
static void LuaJit_OnChange(void)
|
||||
{
|
||||
if (!gL)
|
||||
@@ -208,7 +208,7 @@ static int noglobals(lua_State *L)
|
||||
return luaL_error(L, "Implicit global " LUA_QS " prevented. Create a local variable instead.", csname);
|
||||
}
|
||||
|
||||
#ifndef NOBLUAJIT
|
||||
#ifdef HAVE_BLUAJIT
|
||||
// print all the ISA extensions because it looks cool!
|
||||
// absolutely not stolen from luajit.c
|
||||
static void print_jit_status(boolean verbose)
|
||||
@@ -274,7 +274,7 @@ void LUA_ClearState(void)
|
||||
// lua state is ready!
|
||||
gL = L;
|
||||
|
||||
#ifndef NOBLUAJIT
|
||||
#ifdef HAVE_BLUAJIT
|
||||
print_jit_status(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
#include "d_player.h"
|
||||
#include "p_saveg.h"
|
||||
|
||||
#ifdef NOBLUAJIT
|
||||
#ifndef HAVE_BLUAJIT
|
||||
#include "blua/lua.h"
|
||||
#include "blua/lualib.h"
|
||||
#include "blua/lauxlib.h"
|
||||
|
||||
Reference in new issue
Block a user