diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-11 18:01:48 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-11 18:27:58 +0200 |
commit | 58f3ff71751eae2d697bb45a6cefd197547e0b33 (patch) | |
tree | d00789c4b37b7acc519a600483fe0f948160a691 /CMakeLists.txt | |
parent | 038ffd2ee4dc7316e4b882a1cf04d4d090236937 (diff) | |
parent | 814205f306cad8a4b3e55785616ea69a027fef9d (diff) | |
download | mariadb-git-58f3ff71751eae2d697bb45a6cefd197547e0b33.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f0f7364412..895fd489a23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,6 +222,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 |