mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-12 10:36:36 +00:00
Added toolchain abstraction for undefined behaviour sanitizer Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
17 lines
313 B
CMake
17 lines
313 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
macro(toolchain_cc_asan)
|
|
|
|
zephyr_compile_options(-fsanitize=address)
|
|
zephyr_link_libraries(-lasan)
|
|
zephyr_ld_options(-fsanitize=address)
|
|
|
|
endmacro()
|
|
|
|
macro(toolchain_cc_ubsan)
|
|
|
|
zephyr_compile_options(-fsanitize=undefined)
|
|
zephyr_ld_options(-fsanitize=undefined)
|
|
|
|
endmacro()
|