mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 02:47:02 +02:00
build: add macOS (Apple Silicon) build support
macOS compiles the existing POSIX/Linux code paths (KYTY_PLATFORM_LINUX) targeting x86_64 under Rosetta 2. Adds an APPLE branch to the build: selects Apple's ld64 linker, unsets the Ninja response-file forcing (Apple ar has no @file support), derives the target arch from CMAKE_OSX_ARCHITECTURES for cpuinfo/ffmpeg, and re-signs the binary post-build with JIT entitlements (required to execute written trampolines and Rosetta-translated guest code). All changes are guarded by if(APPLE); Windows and Linux configuration is unchanged. (cherry picked from commit 13be13b7573b9a687cf87531a81e4497ed3de1d5)
This commit is contained in:
+9
-1
@@ -68,7 +68,15 @@ set(KYTY_WARNINGS_ARE_ERRORS OFF)
|
||||
set(KYTY_C_FLAGS "")
|
||||
set(KYTY_CPP_FLAGS "")
|
||||
|
||||
SET(CMAKE_NINJA_FORCE_RESPONSE_FILE 1 CACHE INTERNAL "")
|
||||
# Apple's /usr/bin/ar does not understand @response-file syntax, and macOS has a
|
||||
# large ARG_MAX so response files aren't needed. Note: the Ninja generator forces a
|
||||
# response file whenever CMAKE_NINJA_FORCE_RESPONSE_FILE is *defined* (it tests
|
||||
# definedness, not the value), so on Apple it must be fully unset, not set to 0.
|
||||
if(APPLE)
|
||||
unset(CMAKE_NINJA_FORCE_RESPONSE_FILE CACHE)
|
||||
else()
|
||||
SET(CMAKE_NINJA_FORCE_RESPONSE_FILE 1 CACHE INTERNAL "")
|
||||
endif()
|
||||
|
||||
if(KYTY_CLANG_CL)
|
||||
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||
|
||||
Reference in New Issue
Block a user