build: Update architecture comments and set mtune=generic.

This commit is contained in:
squidbus 2025-04-07 10:20:02 -07:00
parent ba04890568
commit 13b5e8f794

View File

@ -54,8 +54,9 @@ else()
endif() endif()
if (ARCHITECTURE STREQUAL "x86_64") if (ARCHITECTURE STREQUAL "x86_64")
# Set x86_64 target level to Sandy Bridge to generally match what is supported for PS4 guest code with CPU patches. # Target Sandy Bridge as a reasonable subset of instructions supported by PS4 and host CPUs.
add_compile_options(-march=sandybridge) # Note that the native PS4 architecture 'btver2' has been attempted but causes issues with M1 CPUs.
add_compile_options(-march=sandybridge -mtune=generic)
endif() endif()
if (APPLE AND ARCHITECTURE STREQUAL "x86_64" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64") if (APPLE AND ARCHITECTURE STREQUAL "x86_64" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64")