aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTae Won Ha <h@taewon.de>2020-07-11 14:35:12 +0200
committerJames McCoy <jamessan@jamessan.com>2020-12-13 21:03:27 -0500
commit27ddaa39db6ae18c2a6e4c1b816f3ee35466d05c (patch)
tree775c4903cf108916011217d2472334f362abaff9
parent12709c475b38f354bb17dd12d543662fb6db370c (diff)
downloadrneovim-27ddaa39db6ae18c2a6e4c1b816f3ee35466d05c.tar.gz
rneovim-27ddaa39db6ae18c2a6e4c1b816f3ee35466d05c.tar.bz2
rneovim-27ddaa39db6ae18c2a6e4c1b816f3ee35466d05c.zip
Do not set pagezero_size and image_base for LuaJIT >= 2.1.0-beta3
This is properly handled in LuaJIT now and setting causes "Malformed Mach-o file" error when running the resulting binary on arm64 Macs.
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b34639d32..e3c67c55cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -352,8 +352,8 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_definitions(-D_GNU_SOURCE)
endif()
-if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
- # Required for luajit.
+if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT PREFER_LUA AND LUAJIT_VERSION LESS "2.1.0-beta3")
+ # Required for luajit < 2.1.0-beta3.
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000")
set(CMAKE_SHARED_LINKER_FLAGS