cmake:bugfix SIM_ASAN cannot automatically link libasan in cmake build

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
xuxin19 2024-05-07 17:09:28 +08:00 committed by Xiang Xiao
parent cd46d27489
commit b073b3efc1
1 changed files with 1 additions and 0 deletions

View File

@ -75,6 +75,7 @@ endif()
if(CONFIG_SIM_ASAN)
add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
add_compile_options(-fsanitize-address-use-after-scope)
add_compile_options(-fsanitize=pointer-compare)
add_compile_options(-fsanitize=pointer-subtract)