mirror of
https://github.com/mudita/MuditaOS.git
synced 2025-12-23 22:17:57 -05:00
Due to using wrappers for the glibc syscalls the ASAN doesn't work well. We also had trouble with integrating this tool with GCC12. The ASAN is still available but is turned off by default. Use -DLINUX_ENABLE_SANITIZER=ON to turn on. Our recommendation is to use Valgrind as the runtime profiling tool. It's added for visual studio code.
21 lines
520 B
CMake
21 lines
520 B
CMake
set(PROJECT_TARGET "TARGET_Linux" CACHE INTERNAL "")
|
|
|
|
add_compile_options(-funsigned-char)
|
|
|
|
set(TARGET_LIBRARIES
|
|
rt
|
|
pthread
|
|
CACHE INTERNAL "" )
|
|
|
|
link_libraries(pthread rt)
|
|
|
|
option (LINUX_ENABLE_SANITIZER "Enable address sanitizer for Linux" OFF)
|
|
if (LINUX_ENABLE_SANITIZER)
|
|
add_compile_options(-fsanitize=address)
|
|
add_link_options(-fsanitize=address)
|
|
add_link_options(-pthread)
|
|
endif (LINUX_ENABLE_SANITIZER)
|
|
|
|
set(CMAKE_STRIP strip CACHE INTERNAL "")
|
|
set(CMAKE_OBJCOPY objcopy CACHE INTERNAL "")
|