From 29656563259be924e04dca02e5f2a7c63f27beee Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Wed, 9 Apr 2025 00:54:39 -0700 Subject: [PATCH] build: Target same CPU architecture level as PS4. (#2763) --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f3d4468f..37492eeb3 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,9 +54,9 @@ else() endif() if (ARCHITECTURE STREQUAL "x86_64") - # Target Sandy Bridge as a reasonable subset of instructions supported by PS4 and host CPUs. - # Note that the native PS4 architecture 'btver2' has been attempted but causes issues with M1 CPUs. - add_compile_options(-march=sandybridge -mtune=generic) + # Target the same CPU architecture as the PS4, to maintain the same level of compatibility. + # Exclude SSE4a as it is only available on AMD CPUs. + add_compile_options(-march=btver2 -mtune=generic -mno-sse4a) endif() if (APPLE AND ARCHITECTURE STREQUAL "x86_64" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64")