diff options
| author | ruki <[email protected]> | 2020-09-18 23:22:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-09-18 23:22:28 +0800 |
| commit | 8ce00ad1b4da188521a41aa29454245151c531c5 (patch) | |
| tree | dc68ea28431b5d245a330c0f412112d804bb58f4 /core/src/luajit/xmake.lua | |
| parent | 21382868fb2f8402fa3acce74604d588b7f3c1d9 (diff) | |
fix luajit gc crash for armv7
Diffstat (limited to 'core/src/luajit/xmake.lua')
| -rw-r--r-- | core/src/luajit/xmake.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/src/luajit/xmake.lua b/core/src/luajit/xmake.lua index 5553bb43a..6ae88324f 100644 --- a/core/src/luajit/xmake.lua +++ b/core/src/luajit/xmake.lua @@ -6,9 +6,9 @@ if is_plat("msys", "cygwin") then plat = "windows" arch = is_arch("x86_64") and "x64" or "x86" end -if is_arch("arm64-v8a") then +if is_arch("arm64", "arm64-v8a") then arch = "arm64" -elseif is_arch("armv7") then +elseif is_arch("arm.*") then arch = "arm" end if os.isfile("/etc/redhat-release") then @@ -52,6 +52,11 @@ target("luajit") add_defines("LUAJIT_DISABLE_JIT") end + -- using internal memory management under armv7, gc will cause a crash when free strings in lua_close() + if arch == "arm" then + add_defines("LUAJIT_USE_SYSMALLOC") + end + -- enable lua5.2 compat, @see http://luajit.org/extensions.html --[[ add_defines("LUAJIT_ENABLE_LUA52COMPAT") |
