]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
cmake: use RelWithDebInfo, not Debug, with CONFIG_DEBUG 18709/head
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sun, 4 May 2025 20:40:13 +0000 (21:40 +0100)
committerRobert Marko <robimarko@gmail.com>
Sat, 10 May 2025 10:41:26 +0000 (12:41 +0200)
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@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18709
Signed-off-by: Robert Marko <robimarko@gmail.com>
include/cmake.mk

index f59410c2f32dd80124d701470cd337a33cc1f04a..699257506aa21c40d510b216c5539e56decf2342 100644 (file)
@@ -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)" \