Skip to content

Commit

Permalink
fix: XCode 16 and LuaJit no dedup workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaozg committed Sep 22, 2024
1 parent 18a430d commit ae8cbfe
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions LuaJIT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,23 @@ if(IOS)
set_xcode_property(libluajit IPHONEOS_DEPLOYMENT_TARGET "9.0" "all")
endif()

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# Any Clang
# add_compile_options()
if(CMAKE_CXX_COMPILER_ID MATCHES "^AppleClang$")
# Apple Clang only
add_compile_options(
-faligned-allocation
-fasm-blocks
)

# LuaJit + XCode 16 goes blammo
add_link_options(
-Wl,-no_deduplicate
)
endif()
endif()

if("${LJ_TARGET_ARCH}" STREQUAL "x86")
if(CMAKE_COMPILER_IS_CLANGXX OR CMAKE_COMPILER_IS_GNUCXX)
target_compile_options(libluajit PRIVATE
Expand Down

0 comments on commit ae8cbfe

Please sign in to comment.