mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
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 <2265215145@qq.com>
This commit is contained in:
parent
9c10bbd04a
commit
14e434c3f0
1 changed files with 6 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue