build: Target same CPU architecture level as PS4. (#2745)

This commit is contained in:
squidbus 2025-04-04 05:13:13 -07:00 committed by GitHub
parent 1ee2016902
commit 54b4d7fc78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -54,8 +54,8 @@ else()
endif()
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.
add_compile_options(-march=sandybridge)
# Target the same x86_64 feature set as the PS4 CPU to match requirements.
add_compile_options(-march=btver2 -mno-sse4a)
endif()
if (APPLE AND ARCHITECTURE STREQUAL "x86_64" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64")