Fix building on Windows (hopefully)
This commit is contained in:
1 parent
34fca9f5a4
commit
07104e60f4
2 files changed
+14
-9
No files matched your search
@@ -30,6 +30,11 @@ XCFLAGS+= -DLUAJIT_INTONLY
|
||||
# needed for the headers
|
||||
OPTS+=-DLUAJIT_INTONLY
|
||||
|
||||
ifdef MINGW
|
||||
TARGET_SYS= Windows
|
||||
HOST_MSYS= mingw
|
||||
endif
|
||||
|
||||
ifeq (Windows,$(findstring Windows,$(OS))$(MSYSTEM)$(TERM))
|
||||
HOST_SYS= Windows
|
||||
else
|
||||
@@ -56,7 +61,7 @@ HOST_RM?= rm -f
|
||||
|
||||
HOST_XCFLAGS= -Ibluajit
|
||||
HOST_XLIBS=
|
||||
HOST_ACFLAGS= $(CCOPTIONS) $(HOST_XCFLAGS) $(TARGET_ARCH) $(HOST_CFLAGS)
|
||||
HOST_ACFLAGS= $(XCFLAGS) $(HOST_XCFLAGS) $(TARGET_ARCH)
|
||||
|
||||
TARGET_CC= $(CROSS)$(CC)
|
||||
|
||||
@@ -352,7 +357,7 @@ ifeq (iOS,$(TARGET_SYS))
|
||||
LJVM_MODE= machasm
|
||||
endif
|
||||
|
||||
ifeq (Windows,$(HOST_SYS))
|
||||
ifeq (Windows,$(TARGET_SYS))
|
||||
MINILUA_T= $(OBJDIR)/minilua.exe
|
||||
BUILDVM_T= $(OBJDIR)/buildvm.exe
|
||||
ifeq (,$(HOST_MSYS))
|
||||
|
||||
+7
-7
@@ -340,7 +340,7 @@ static void jit_library(lua_State *L) {
|
||||
lua_rawset(L, -4); \
|
||||
lua_pop(L, 1);
|
||||
|
||||
#define DELETE(name) \
|
||||
#define DELEET(name) \
|
||||
lua_pushliteral(L, name); \
|
||||
lua_pushnil(L); \
|
||||
lua_rawset(L, -3); \
|
||||
@@ -348,7 +348,7 @@ static void jit_library(lua_State *L) {
|
||||
// replace io.open, delete io.popen
|
||||
lua_getglobal(L, "io");
|
||||
REPLACE("open", namechecker)
|
||||
DELETE("popen")
|
||||
DELEET("popen")
|
||||
lua_pop(L, 1);
|
||||
|
||||
// replace file:write
|
||||
@@ -358,14 +358,14 @@ static void jit_library(lua_State *L) {
|
||||
|
||||
// delete various base library functions
|
||||
lua_pushvalue(L, LUA_GLOBALSINDEX);
|
||||
DELETE("dofile")
|
||||
DELETE("loadfile")
|
||||
DELETE("load")
|
||||
DELETE("loadstring")
|
||||
DELEET("dofile")
|
||||
DELEET("loadfile")
|
||||
DELEET("load")
|
||||
DELEET("loadstring")
|
||||
lua_pop(L, 1);
|
||||
|
||||
#undef REPLACE
|
||||
#undef DELETE
|
||||
#undef DELEET
|
||||
}
|
||||
|
||||
#endif // ifndef NOBLUAJIT
|
||||
|
||||
Reference in new issue
Block a user