From 1df98ba57fee513ce22e8f6fd69d047a2dab1fdc Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Fri, 29 Jul 2022 19:48:39 +0100 Subject: [PATCH] Enable fwrapv for defined signed integer overflow behaviour Nintendo enables this for HOS so we should do the same to avoid any cases where it's relied on. --- app/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 530ffaa9..fd2e0ed7 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(source_DIR ${CMAKE_SOURCE_DIR}/src/main/cpp) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing -Wno-unused-command-line-argument") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing -Wno-unused-command-line-argument -fwrapv") set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -flto=full -fno-stack-protector -DNDEBUG") # Build all libraries with -Ofast but with default debug data (-g) for debug builds