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.
This commit is contained in:
Billy Laws 2022-07-29 19:48:39 +01:00
parent d183d14e2a
commit 1df98ba57f

View File

@ -9,7 +9,7 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(source_DIR ${CMAKE_SOURCE_DIR}/src/main/cpp) 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") 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 # Build all libraries with -Ofast but with default debug data (-g) for debug builds