From fb319a352aff132eee8b7a3ab0e28041bb706b91 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Mon, 14 Apr 2025 09:29:15 +0200 Subject: [PATCH] Enable -fno-strict-aliasing --- FEXCore/CMakeLists.txt | 6 +++++- Source/CMakeLists.txt | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/FEXCore/CMakeLists.txt b/FEXCore/CMakeLists.txt index baa6541f9..92a40fb7f 100644 --- a/FEXCore/CMakeLists.txt +++ b/FEXCore/CMakeLists.txt @@ -67,7 +67,11 @@ configure_file( include_directories(${CMAKE_BINARY_DIR}/generated) -add_compile_options(-fno-exceptions) +# Disable strict aliasing for all build modes +# See discussion in https://github.com/FEX-Emu/FEX/pull/4494#issuecomment-2800608944 +# for background context. +add_compile_options($<$:-fno-strict-aliasing> $<$:-fno-exceptions>) + add_subdirectory(Source/) install (DIRECTORY include/FEXCore ${CMAKE_BINARY_DIR}/include/FEXCore diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 7514e23ec..6f4c828b2 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -1,3 +1,8 @@ +# Disable strict aliasing for all build modes +# See discussion in https://github.com/FEX-Emu/FEX/pull/4494#issuecomment-2800608944 +# for background context. +add_compile_options($<$:-fno-strict-aliasing>) + add_subdirectory(Common/) add_subdirectory(Tools/)