diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-11 11:45:33 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-11 11:45:33 +0200 |
commit | 3ea49d35bd93c515f3da55b846850ba1125971a0 (patch) | |
tree | 6ac151cd540109709f3f89e6fdd0ecb324781dd8 /CMakeLists.txt | |
parent | ab7e2b048d7d0835ae7473873169b7606114348e (diff) | |
parent | 2a2ab121b0f65cdc4b104ec763d23f1b7035a644 (diff) | |
download | mariadb-git-3ea49d35bd93c515f3da55b846850ba1125971a0.tar.gz |
Merge 10.1 into 10.2
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e25c981e0da..93392056cf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -211,6 +211,15 @@ IF (WITH_ASAN) ENDIF() 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() + + # enable security hardening features, like most distributions do # in our benchmarks that costs about ~1% of performance, depending on the load IF(CMAKE_C_COMPILER_VERSION VERSION_LESS "4.6") |