summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZephyron <zephyron@citron-emu.org>2025-01-17 15:43:31 +1000
committerZephyron <zephyron@citron-emu.org>2025-01-17 15:43:31 +1000
commitee0beea82a999f6a46f7f980c700867f860905f1 (patch)
treec5f4acd3a9ec15dfc2844130bdf84d3775786c13
parent62de5aa9def7e8617b5c390fdce5f9a71d34df6a (diff)
Remove x86-64 ISA compatibility flags and toolchain
Remove the x86-64 instruction set architecture (ISA) compatibility flags and associated toolchain file that were setting CPU architecture compatibility levels. This simplifies the build system by removing the custom ISA flag handling and x86-64-v2 option. Changes: - Remove x86-64 ISA flags configuration block from CMakeLists.txt - Delete unused x86-64-toolchain.cmake file - Remove CITRON_USE_X86_64_V2 option
-rw-r--r--CMakeLists.txt33
-rw-r--r--cmake/x86-64-toolchain.cmake5
2 files changed, 0 insertions, 38 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eab04f370..a922a4f3c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -673,36 +673,3 @@ if(ENABLE_QT AND UNIX AND NOT APPLE)
install(FILES "dist/org.citron_emu.citron.metainfo.xml"
DESTINATION "share/metainfo")
endif()
-
-# Set CPU architecture compatibility flags
-if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
- # Default to x86-64 baseline for maximum compatibility
- set(ISA_FLAGS "-march=x86-64")
-
- # Allow override via CMake option
- option(CITRON_USE_X86_64_V2 "Enable x86-64-v2 instruction set" OFF)
-
- if(CITRON_USE_X86_64_V2)
- set(ISA_FLAGS "-march=x86-64-v2")
- endif()
-
- # Set for main project
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ISA_FLAGS}")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ISA_FLAGS}")
-
- # Set for vcpkg dependencies
- set(VCPKG_CXX_FLAGS "${ISA_FLAGS}")
- set(VCPKG_C_FLAGS "${ISA_FLAGS}")
-
- # Set toolchain options for vcpkg
- set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/x86-64-toolchain.cmake")
-
- # Ensure we're not getting overridden by system defaults
- add_compile_options(${ISA_FLAGS})
-
- # Force disable higher ISA levels
- add_compile_definitions(
- __x86_64_v3__=0
- __x86_64_v4__=0
- )
-endif()
diff --git a/cmake/x86-64-toolchain.cmake b/cmake/x86-64-toolchain.cmake
deleted file mode 100644
index e94f1ee98..000000000
--- a/cmake/x86-64-toolchain.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-# Rename this file to x86-64-toolchain.cmake
-
-# Set baseline x86-64 flags for maximum compatibility
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=x86-64" CACHE STRING "C flags")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64" CACHE STRING "C++ flags") \ No newline at end of file