From 02407ad192b3a10aae01f3a977005f06c5b4159c Mon Sep 17 00:00:00 2001 From: yanxingyu17 Date: Mon, 20 Apr 2026 21:20:16 +0800 Subject: [PATCH] arch/risc-v/cmake: fix linker option case in Toolchain.cmake. Fix lowercase -wl to correct -Wl for GCC linker pass-through option in LTO full configuration. The lowercase form is not recognized by the linker, causing --print-memory-usage to be silently ignored. Signed-off-by: v-yanxingyu --- arch/risc-v/src/cmake/Toolchain.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/risc-v/src/cmake/Toolchain.cmake b/arch/risc-v/src/cmake/Toolchain.cmake index e749424bd44..2e0a9614293 100644 --- a/arch/risc-v/src/cmake/Toolchain.cmake +++ b/arch/risc-v/src/cmake/Toolchain.cmake @@ -106,7 +106,7 @@ elseif(CONFIG_LTO_FULL) if(CONFIG_ARCH_TOOLCHAIN_GNU) add_compile_options(-fno-builtin) add_compile_options(-fuse-linker-plugin) - add_link_options(-wl,--print-memory-usage) + add_link_options(-Wl,--print-memory-usage) endif() endif()