diff --git a/CMakeLists.txt b/CMakeLists.txt index a2797c2c1ed..f8a80016154 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,6 +141,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") -faligned-allocation -fasm-blocks ) + + # LuaJit + XCode 16 goes blammo + add_link_options( + -Wl,-no_deduplicate + ) endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "^GNU$") # GCC only diff --git a/libs/luajitlib/build-macos-luajit.sh b/libs/luajitlib/build-macos-luajit.sh index 87cb9eb16a1..93af206b491 100755 --- a/libs/luajitlib/build-macos-luajit.sh +++ b/libs/luajitlib/build-macos-luajit.sh @@ -29,11 +29,11 @@ cd "${SD}/LuaJIT" || error=1 export MACOSX_DEPLOYMENT_TARGET=10.9 # Pipe output to /dev/null to suppress linker errors -make amalg -j HOST_CC="clang -target `uname -m`-apple-macos10.9" TARGET_CC="xcrun --toolchain arm64 clang -target arm64-apply-macos10.9 -isysroot $(xcrun --sdk macosx --show-sdk-path) -fvisibility=hidden -fvisibility-inlines-hidden" TARGET_CFLAGS="-O3" > /dev/null 2>&1 +make amalg -j HOST_CC="clang -target `uname -m`-apple-macos10.9" TARGET_CC="xcrun --toolchain arm64 clang -target arm64-apply-macos10.9 -isysroot $(xcrun --sdk macosx --show-sdk-path) -fvisibility=hidden -fvisibility-inlines-hidden" TARGET_LDFLAGS="-Wl,-no_deduplicate" TARGET_CFLAGS="-O3" > /dev/null 2>&1 cp src/lib*a "${OD}/arm64" || error=1 make clean || error=1 -make amalg -j HOST_CC="clang -target `uname -m`-apple-macos10.9" TARGET_CC="xcrun --toolchain x86_64 clang -target x86_64-apply-macos10.9 -isysroot $(xcrun --sdk macosx --show-sdk-path) -fvisibility=hidden -fvisibility-inlines-hidden" TARGET_CFLAGS="-O3" > /dev/null 2>&1 +make amalg -j HOST_CC="clang -target `uname -m`-apple-macos10.9" TARGET_CC="xcrun --toolchain x86_64 clang -target x86_64-apply-macos10.9 -isysroot $(xcrun --sdk macosx --show-sdk-path) -fvisibility=hidden -fvisibility-inlines-hidden" TARGET_LDFLAGS="-Wl,-no_deduplicate" TARGET_CFLAGS="-O3" > /dev/null 2>&1 cp src/lib*a "${OD}/x86_64" || error=1 lipo -create -arch arm64 "${OD}/arm64/libluajit.a" -arch x86_64 "${OD}/x86_64/libluajit.a" -output "${OD}/libluajit.a" || error=1