diff --git a/LuaJIT.cmake b/LuaJIT.cmake index 3b905ad..04bc37a 100644 --- a/LuaJIT.cmake +++ b/LuaJIT.cmake @@ -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