From 8108b6aa5a3bec571b9c4082098c88e032cce203 Mon Sep 17 00:00:00 2001 From: Nevyn Bengtsson Date: Mon, 11 Jan 2021 15:29:05 +0100 Subject: [PATCH] Switch luajit GC and remove image_base settings to fix dyld shared cache errors on macOS 11 --- CMakeLists.txt | 7 ++++--- deps/luajit | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 68c65837..33faef13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,9 +115,10 @@ endif() # Lua if(LOVR_USE_LUAJIT AND NOT EMSCRIPTEN) - if (APPLE) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000") - endif() + # Required to make luajit compile without breaking linker cache on macOS Big Sur. Also, is a better, + # newer GC so enable it on all builds. + set(LUAJIT_ENABLE_GC64 ON) + if(LOVR_SYSTEM_LUA) pkg_search_module(LUAJIT REQUIRED luajit) include_directories(${LUAJIT_INCLUDE_DIRS}) diff --git a/deps/luajit b/deps/luajit index c37be68c..05db1d35 160000 --- a/deps/luajit +++ b/deps/luajit @@ -1 +1 @@ -Subproject commit c37be68cf0876eb60f9f9ffd3920963f6ef01d7e +Subproject commit 05db1d35d8a35f74ce40d0ba5e387717ad91b24d