summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-11 17:49:36 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-11 17:49:36 +0200
commit814205f306cad8a4b3e55785616ea69a027fef9d (patch)
treef70402682975e8c6a99ea34a7b1ff3dd9ba73b32 /CMakeLists.txt
parent89b463ee99c22e69fe4adf686e0d61cd20973c49 (diff)
parent28e713dc12881e7f50207d0c642523ca3e630114 (diff)
downloadmariadb-git-814205f306cad8a4b3e55785616ea69a027fef9d.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc30750df99..a8e6307e975 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -213,6 +213,14 @@ IF (WITH_TSAN)
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=thread" DEBUG RELWITHDEBINFO)
ENDIF()
+OPTION(WITH_UBSAN "Enable undefined behavior sanitizer" OFF)
+IF (WITH_UBSAN)
+ IF(SECURITY_HARDENED)
+ MESSAGE(FATAL_ERROR "WITH_UBSAN and SECURITY_HARDENED are mutually exclusive")
+ ENDIF()
+ MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=undefined" DEBUG RELWITHDEBINFO)
+ENDIF()
+
IF(NOT WITH_TSAN)
# enable security hardening features, like most distributions do
# in our benchmarks that costs about ~1% of performance, depending on the load