aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-09-19 11:49:17 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-09-19 11:49:17 +0100
commit19161c5a95bdcb3130df10410ab0b36e29c8d589 (patch)
tree1391eb122e89df7f7eca2e19c9af150c93dca31c /cmake
parent9af2911e8dfa989bcdbf1e3aa2eb999f3f6b7dad (diff)
downloadrspamd-19161c5a95bdcb3130df10410ab0b36e29c8d589.tar.gz
rspamd-19161c5a95bdcb3130df10410ab0b36e29c8d589.zip
[Minor] Respect full debug request in sanitizers config
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Sanitizer.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/cmake/Sanitizer.cmake b/cmake/Sanitizer.cmake
index 58a240f6f..b13e418e3 100644
--- a/cmake/Sanitizer.cmake
+++ b/cmake/Sanitizer.cmake
@@ -4,9 +4,17 @@ option (SANITIZE "Enable sanitizer: address, memory, undefined, leak (comma sepa
set (SAN_FLAGS "${SAN_FLAGS} -g -fno-omit-frame-pointer -DSANITIZER")
# O1 is normally set by clang, and -Og by gcc
if (COMPILER_GCC)
- set (SAN_FLAGS "${SAN_FLAGS} -Og")
+ if (ENABLE_FULL_DEBUG MATCHES "ON")
+ set (SAN_FLAGS "${SAN_FLAGS} -O0")
+ else()
+ set (SAN_FLAGS "${SAN_FLAGS} -Og")
+ endif()
else ()
- set (SAN_FLAGS "${SAN_FLAGS} -O1")
+ if (ENABLE_FULL_DEBUG MATCHES "ON")
+ set (SAN_FLAGS "${SAN_FLAGS} -O0")
+ else()
+ set (SAN_FLAGS "${SAN_FLAGS} -O1")
+ endif()
endif ()
if (SANITIZE)
if (ENABLE_JEMALLOC MATCHES "ON")