Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
fesily committed Dec 13, 2024
1 parent fddbab8 commit 8128bf7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 5 additions & 1 deletion compile/luajit/make.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ local arch = defined.arch
local LUAJIT_ENABLE_LUA52COMPAT = defined.LUAJIT_ENABLE_LUA52COMPAT
local LUAJIT_NUMMODE = defined.LUAJIT_NUMMODE
local luajitDir = defined.luajitDir
local is_old_version_luajit = defined.is_old_version_luajit

local LJLIB_C = {
luajitDir .. "/lib_base.c ",
Expand Down Expand Up @@ -144,7 +145,10 @@ lm:executable("luajit/lua") {
"lj_libdef.h",
"lj_recdef.h",
},
deps = has_str_hash and "lj_str_hash.c",
deps = {
has_str_hash and "lj_str_hash.c",
not is_old_version_luajit and "luajit_h"
},
sources = {
"luajit.c",
"lj_*.c",
Expand Down
5 changes: 2 additions & 3 deletions compile/luajit/make_windows.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
local lm = require "luamake"
local fs = require 'bee.filesystem'

local luaver = "luajit"
local luajitDir = '3rd/lua/' .. luaver
local luajitSrcDir = luajitDir .. '/src'
local bindir = "publish/runtime/"..lm.runtime_platform
local is_old_version_luajit = fs.exists(fs.path(luajitSrcDir) / 'lj_init.c')
local is_old_version_luajit = require "compile.luajit.defined".is_old_version_luajit

lm:exe "minilua" {
rootdir= luajitDir,
Expand Down Expand Up @@ -181,7 +180,7 @@ lm:shared_library "luajit/luajit" {
"lj_recdef",
--"lj_vmdef",
"lj_folddef",
"luajit_h",
not is_old_version_luajit and "luajit_h",
},
defines = {
"_CRT_SECURE_NO_WARNINGS",
Expand Down

0 comments on commit 8128bf7

Please sign in to comment.