From 12898faa1b1d1e74d23d5525371432f4cf1f4616 Mon Sep 17 00:00:00 2001 From: lizzie Date: Thu, 27 Aug 2026 05:32:20 +0000 Subject: [PATCH] [*] use -fno-strict-aliasing to fix any would be bugs for LTO Signed-off-by: lizzie --- src/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a2abc7d1b3..280b0dc8bb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -147,6 +147,10 @@ if (MSVC AND NOT CXX_CLANG) set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG /MANIFEST:NO" CACHE STRING "" FORCE) set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE) else() + # according to sam, should fix any issues we have with LTO builds + # having bugs that non-LTO builds don't have + add_compile_options( + $<$:-fno-strict-aliasing>) if (NOT MSVC) add_compile_options( $<$:-fwrapv>