summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-07-16 22:18:57 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-07-16 22:18:57 +0100
commitcfd83431c040ffbd5dd946b4131a566195fe6d89 (patch)
tree7b42e7bcc8fc19cba2b0562a43d4d99d3d215f52 /cmake
parentd2bf9fd226253e32d1d70f7ad379fcbb2ccb6d61 (diff)
downloadrspamd-cfd83431c040ffbd5dd946b4131a566195fe6d89.tar.gz
rspamd-cfd83431c040ffbd5dd946b4131a566195fe6d89.zip
[Minor] Another try to use the proper linker
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Sanitizer.cmake1
-rw-r--r--cmake/Toolset.cmake6
2 files changed, 4 insertions, 3 deletions
diff --git a/cmake/Sanitizer.cmake b/cmake/Sanitizer.cmake
index b13e418e3..c2587066f 100644
--- a/cmake/Sanitizer.cmake
+++ b/cmake/Sanitizer.cmake
@@ -1,6 +1,5 @@
# Ported from Clickhouse: https://github.com/ClickHouse/ClickHouse/blob/master/cmake/sanitize.cmake
-option (SANITIZE "Enable sanitizer: address, memory, undefined, leak (comma separated list)" "")
set (SAN_FLAGS "${SAN_FLAGS} -g -fno-omit-frame-pointer -DSANITIZER")
# O1 is normally set by clang, and -Og by gcc
if (COMPILER_GCC)
diff --git a/cmake/Toolset.cmake b/cmake/Toolset.cmake
index dfd1d3008..4e7017dfd 100644
--- a/cmake/Toolset.cmake
+++ b/cmake/Toolset.cmake
@@ -80,12 +80,14 @@ if(NOT LINKER_NAME)
if(LLD_PATH)
if (COMPILER_CLANG)
set(LINKER_NAME "lld")
- else()
+ elseif(NOT SANITIZE)
if(GOLD_PATH)
set(LINKER_NAME "gold")
else()
- message(STATUS "Use generic 'ld' as a linker")
+ message(STATUS "Use generic 'ld' as a linker: gold not found")
endif()
+ else()
+ message(STATUS "Use generic 'ld' as a linker: sanitizers are enabled")
endif()
elseif(GOLD_PATH)
set(LINKER_NAME "gold")