[openwrt/openwrt] cmake: use RelWithDebInfo, not Debug, with CONFIG_DEBUG

LEDE Commits lede-commits at lists.infradead.org
Sat May 10 03:41:29 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/703e7d2d5b58e68528cb5fadfc1185bd3904b3d9

commit 703e7d2d5b58e68528cb5fadfc1185bd3904b3d9
Author: Nathaniel Wesley Filardo <nwfilardo at gmail.com>
AuthorDate: Sun May 4 21:40:13 2025 +0100

    cmake: use RelWithDebInfo, not Debug, with CONFIG_DEBUG
    
    Given the description of the configuration option at its definition in
    target/sdk/files/Config.in ("Compile packages with debugging info" and "Adds -g3
    to the CFLAGS", the more appropriate CMAKE build type is `RelWithDebInfo` rather
    than `Debug`.
    
    Signed-off-by: Nathaniel Wesley Filardo <nwfilardo at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18709
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 include/cmake.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/cmake.mk b/include/cmake.mk
index f59410c2f3..699257506a 100644
--- a/include/cmake.mk
+++ b/include/cmake.mk
@@ -97,7 +97,7 @@ define Build/Configure/Default
 			-DCMAKE_SYSTEM_NAME=Linux \
 			-DCMAKE_SYSTEM_VERSION=1 \
 			-DCMAKE_SYSTEM_PROCESSOR=$(ARCH) \
-			-DCMAKE_BUILD_TYPE=$(if $(CONFIG_DEBUG),Debug,Release) \
+			-DCMAKE_BUILD_TYPE=$(if $(CONFIG_DEBUG),RelWithDebInfo,Release) \
 			-DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
 			-DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
 			-DCMAKE_C_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \




More information about the lede-commits mailing list