diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1fadf3344..e3f3b5c8d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -384,6 +384,11 @@ jobs: apt update bash dist/get_deps_debian.sh + apt install software-properties-common -y + add-apt-repository ppa:ubuntu-toolchain-r/test -y + apt update + apt install -y gcc-13 g++-13 + - name: ⬇️ Install .NET uses: actions/setup-dotnet@v4 with: @@ -397,7 +402,7 @@ jobs: git config --global --add safe.directory '*' mkdir -p build cd build - CC=gcc-12 CXX=g++-12 cmake -G "Ninja" \ + CC=gcc-13 CXX=g++-13 cmake -G "Ninja" \ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index 2df604b7d..1a989c9f5 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -600,6 +600,15 @@ macro(setupCompilerFlags target) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IMHEX_COMMON_FLAGS} ${IMHEX_C_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IMHEX_COMMON_FLAGS} ${IMHEX_C_CXX_FLAGS} ${IMHEX_CXX_FLAGS}") set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} ${IMHEX_COMMON_FLAGS}") + + # Only generate minimal debug information for stacktraces in RelWithDebInfo builds + set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g1") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g1") + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + # Add flags for debug info in inline functions + set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -gstatement-frontiers -ginline-points") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -gstatement-frontiers -ginline-points") + endif() endmacro() # uninstall target diff --git a/lib/external/pattern_language b/lib/external/pattern_language index 5d247e431..f83b855b9 160000 --- a/lib/external/pattern_language +++ b/lib/external/pattern_language @@ -1 +1 @@ -Subproject commit 5d247e431935a1b67e5319526ff37a93847a6a8a +Subproject commit f83b855b9778327cb0ac72996b73ae990966ec1c diff --git a/main/gui/CMakeLists.txt b/main/gui/CMakeLists.txt index 65a6d26b6..bae7eaab7 100644 --- a/main/gui/CMakeLists.txt +++ b/main/gui/CMakeLists.txt @@ -30,6 +30,7 @@ add_executable(main ${APPLICATION_TYPE} target_include_directories(main PUBLIC include) setupCompilerFlags(main) +setupCompilerFlags(libimhex) set(LIBROMFS_RESOURCE_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/romfs) set(LIBROMFS_PROJECT_NAME imhex)