From c3f675c3ea66c76c0143298c46991296387a6877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Thor=C3=A9n?= Date: Sat, 16 Nov 2024 17:15:55 +0100 Subject: [PATCH] Remove '-Og' from MINGW debug builds. It interferes with debugging. See https://stackoverflow.com/a/63386263/2323908. Instead, the default O0 is used. This change makes it possible to use whatever optimization levels you want debug builds, which was previously impossible due to the passing of -Og in CMakeLists.txt. --- CMakeLists.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78a4a7027..0629cf1ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -355,13 +355,6 @@ if(MINGW OR MSVC) if(ICONV_FOUND) set(SYSTEM_LIBS ${SYSTEM_LIBS} iconv) endif() - - # Prevent compiler issues when building Debug - # Assembler might fail with "too many sections" - # With big-obj or 64-bit build will take hours - if(CMAKE_BUILD_TYPE STREQUAL "Debug") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og") - endif() endif(MINGW) endif(MINGW OR MSVC)