Skip to content

Commit 8128bf7

Browse files
committed
fix build error
1 parent fddbab8 commit 8128bf7

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

compile/luajit/make.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ local arch = defined.arch
1010
local LUAJIT_ENABLE_LUA52COMPAT = defined.LUAJIT_ENABLE_LUA52COMPAT
1111
local LUAJIT_NUMMODE = defined.LUAJIT_NUMMODE
1212
local luajitDir = defined.luajitDir
13+
local is_old_version_luajit = defined.is_old_version_luajit
1314

1415
local LJLIB_C = {
1516
luajitDir .. "/lib_base.c ",
@@ -144,7 +145,10 @@ lm:executable("luajit/lua") {
144145
"lj_libdef.h",
145146
"lj_recdef.h",
146147
},
147-
deps = has_str_hash and "lj_str_hash.c",
148+
deps = {
149+
has_str_hash and "lj_str_hash.c",
150+
not is_old_version_luajit and "luajit_h"
151+
},
148152
sources = {
149153
"luajit.c",
150154
"lj_*.c",

compile/luajit/make_windows.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
local lm = require "luamake"
2-
local fs = require 'bee.filesystem'
32

43
local luaver = "luajit"
54
local luajitDir = '3rd/lua/' .. luaver
65
local luajitSrcDir = luajitDir .. '/src'
76
local bindir = "publish/runtime/"..lm.runtime_platform
8-
local is_old_version_luajit = fs.exists(fs.path(luajitSrcDir) / 'lj_init.c')
7+
local is_old_version_luajit = require "compile.luajit.defined".is_old_version_luajit
98

109
lm:exe "minilua" {
1110
rootdir= luajitDir,
@@ -181,7 +180,7 @@ lm:shared_library "luajit/luajit" {
181180
"lj_recdef",
182181
--"lj_vmdef",
183182
"lj_folddef",
184-
"luajit_h",
183+
not is_old_version_luajit and "luajit_h",
185184
},
186185
defines = {
187186
"_CRT_SECURE_NO_WARNINGS",

0 commit comments

Comments
 (0)