Browse Source

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.
pull/12624/head
Tae Won Ha 7 months ago
committed by James McCoy
parent
commit
27ddaa39db
No known key found for this signature in database GPG Key ID: DFE691AE331BA3DB
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      CMakeLists.txt

+ 2
- 2
CMakeLists.txt View File

@ -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


Loading…
Cancel
Save