1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-13 11:40:33 +00:00

Add -fsanitize=undefined to ASAN build

This commit is contained in:
Carles Fernandez 2023-11-24 14:00:53 +01:00
parent 0a438ec726
commit 49eb161d90
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 4 additions and 4 deletions

View File

@ -191,9 +191,9 @@ endif()
# NOTE: This is not defined on Windows systems.
########################################################################
if(NOT WIN32)
set(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
set(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING
"Flags used by the C++ compiler during Address Sanitized builds." FORCE)
set(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
set(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING
"Flags used by the C compiler during Address Sanitized builds." FORCE)
set(CMAKE_EXE_LINKER_FLAGS_ASAN
"-W" CACHE STRING

View File

@ -253,9 +253,9 @@ endif()
# NOTE: This is not defined on Windows systems.
########################################################################
if(NOT WIN32)
set(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
set(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING
"Flags used by the C++ compiler during Address Sanitized builds." FORCE)
set(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
set(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING
"Flags used by the C compiler during Address Sanitized builds." FORCE)
mark_as_advanced(
CMAKE_CXX_FLAGS_ASAN