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 14e434c3f0dab9105a9f4b5ce7528d1ccc9de140 Author: leisiji <[email protected]> AuthorDate: Fri Jun 5 12:06:11 2026 +0800 mm/kasan: Fix compile options applied to wrong target in SPLIT build In SPLIT build mode, nuttx_add_kernel_library(mm SPLIT) creates two targets: mm (system library) and kmm (kernel library). The compile options were being applied to the mm target via target_compile_options(mm ...), but the kasan instrumentation is compiled as part of the kmm target. Change target_compile_options(mm ...) to target_compile_options(kmm ...) so that FLAGS (including -fno-builtin and NO_LTO) are correctly applied to the kernel target where kasan code is compiled. Signed-off-by: leisiji <[email protected]> --- mm/kasan/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mm/kasan/CMakeLists.txt b/mm/kasan/CMakeLists.txt index d33e1805fed..d802a55b1a4 100644 --- a/mm/kasan/CMakeLists.txt +++ b/mm/kasan/CMakeLists.txt @@ -34,4 +34,9 @@ if(CONFIG_MM_KASAN) endif() target_sources(mm PRIVATE ${SRCS}) -target_compile_options(mm PRIVATE ${FLAGS}) + +if(CONFIG_BUILD_FLAT) + target_compile_options(mm PRIVATE ${FLAGS}) +else() + target_compile_options(kmm PRIVATE ${FLAGS}) +endif()
