This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 88078840cfbe927915b6d73b3ad56618eedbf095
Author: yanjun16 <[email protected]>
AuthorDate: Tue Jun 2 13:57:50 2026 +0800

    arch/tricore: use CONFIG_DEBUG_SYMBOLS_LEVEL per toolchain
    
    Remove debug symbol options from common Toolchain.cmake and move them to
    each toolchain-specific cmake file. Replace hardcoded -g with the Kconfig
    CONFIG_DEBUG_SYMBOLS_LEVEL.
    
    Signed-off-by: yanjun16 <[email protected]>
---
 arch/tricore/src/cmake/Toolchain.cmake | 4 ----
 arch/tricore/src/cmake/gcc.cmake       | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/tricore/src/cmake/Toolchain.cmake 
b/arch/tricore/src/cmake/Toolchain.cmake
index 83fbb781333..f32636b1920 100644
--- a/arch/tricore/src/cmake/Toolchain.cmake
+++ b/arch/tricore/src/cmake/Toolchain.cmake
@@ -27,7 +27,3 @@ if(CONFIG_TRICORE_TOOLCHAIN_TASKING)
 elseif(CONFIG_TRICORE_TOOLCHAIN_GNU)
   include(${CMAKE_CURRENT_LIST_DIR}/gcc.cmake)
 endif()
-
-if(CONFIG_DEBUG_SYMBOLS)
-  add_compile_options(${CONFIG_DEBUG_SYMBOLS_LEVEL})
-endif()
diff --git a/arch/tricore/src/cmake/gcc.cmake b/arch/tricore/src/cmake/gcc.cmake
index bd3530413aa..6532568b1c5 100644
--- a/arch/tricore/src/cmake/gcc.cmake
+++ b/arch/tricore/src/cmake/gcc.cmake
@@ -140,7 +140,7 @@ if(CONFIG_DEBUG_LINK_MAP)
 endif()
 
 if(CONFIG_DEBUG_SYMBOLS)
-  add_compile_options(-g)
+  add_compile_options(${CONFIG_DEBUG_SYMBOLS_LEVEL})
 endif()
 
 add_link_options(-Wl,--no-warn-rwx-segments)

Reply via email to