Skip to content

Commit

Permalink
make/kasan: Added cmake toolchain compilation options about kasan for…
Browse files Browse the repository at this point in the history
… arm64 architecture

Signed-off-by: W-M-R <[email protected]>
  • Loading branch information
W-M-R committed Oct 2, 2024
1 parent 9883c1e commit d0d28d2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arch/arm64/src/cmake/Toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,18 @@ if(CONFIG_MM_KASAN_ALL)
add_compile_options(-fsanitize=kernel-address)
endif()

if(CONFIG_MM_KASAN_GLOBAL)
add_compile_options(--param=asan-globals=1)
endif()

if(CONFIG_MM_KASAN_DISABLE_READS_CHECK)
add_compile_options(--param=asan-instrument-reads=0)
endif()

if(CONFIG_MM_KASAN_DISABLE_WRITES_CHECK)
add_compile_options(--param=asan-instrument-writes=0)
endif()

if(CONFIG_ARCH_INSTRUMENT_ALL)
add_compile_options(-finstrument-functions)
endif()
Expand Down

0 comments on commit d0d28d2

Please sign in to comment.