Files
MuditaOS/Target_Linux.cmake
Dawid Wojtas 2ec5be1061 [BH-1822] Disable Address Sanitizer
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.
2023-11-20 16:45:28 +01:00

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 "")