diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-01-03 12:23:46 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-01-29 23:04:54 +0100 |
commit | 78712eb52fb78aab1e41241063c09814da366b1f (patch) | |
tree | 815888da2d0cde90242e4fab874be724bd518217 /CMakeLists.txt | |
parent | a7d6271cbf63d129045ba4c97333f975bf88e050 (diff) | |
download | mariadb-git-78712eb52fb78aab1e41241063c09814da366b1f.tar.gz |
MDEV-11708 cmake -DWITH_ASAN no longer works
fix the check (must be have_ not HAVE_)
also remove -O1 and -Wno-error, they aren't not needed for asan
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f553bad5b4..be86adbf67b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -183,18 +183,18 @@ INCLUDE(check_compiler_flag) OPTION(WITH_ASAN "Enable address sanitizer" OFF) IF (WITH_ASAN) # gcc 4.8.1 and new versions of clang - MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -O1 -Wno-error -fPIC" + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fPIC" DEBUG RELWITHDEBINFO) - SET(HAVE_C_FSANITIZE ${HAVE_C__fsanitize_address__O1__Wno_error__fPIC}) - SET(HAVE_CXX_FSANITIZE ${HAVE_CXX__fsanitize_address__O1__Wno_error__fPIC}) + SET(HAVE_C_FSANITIZE ${have_C__fsanitize_address__fPIC}) + SET(HAVE_CXX_FSANITIZE ${have_CXX__fsanitize_address__fPIC}) IF(HAVE_C_FSANITIZE AND HAVE_CXX_FSANITIZE) SET(WITH_ASAN_OK 1) ELSE() # older versions of clang - MY_CHECK_AND_SET_COMPILER_FLAG("-faddress-sanitizer -O1 -fPIC" + MY_CHECK_AND_SET_COMPILER_FLAG("-faddress-sanitizer -fPIC" DEBUG RELWITHDEBINFO) - SET(HAVE_C_FADDRESS ${HAVE_C__faddress_sanitizer__O1__fPIC}) - SET(HAVE_CXX_FADDRESS ${HAVE_CXX__faddress_sanitizer__O1__fPIC}) + SET(HAVE_C_FADDRESS ${have_C__faddress_sanitizer__fPIC}) + SET(HAVE_CXX_FADDRESS ${have_CXX__faddress_sanitizer__fPIC}) IF(HAVE_C_FADDRESS AND HAVE_CXX_FADDRESS) SET(WITH_ASAN_OK 1) ENDIF() |