Commit 36a05268 authored by Eugene Kosov's avatar Eugene Kosov

cmake cleanup: drop support for ancient clang in WITH_ASAN option

parent dfae51de
......@@ -196,7 +196,6 @@ OPTION(WITH_ASAN "Enable address sanitizer" OFF)
IF (WITH_ASAN)
# this flag might be set by default on some OS
MY_CHECK_AND_SET_COMPILER_FLAG("-U_FORTIFY_SOURCE" DEBUG RELWITHDEBINFO)
# gcc 4.8.1 and new versions of clang
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fPIC"
DEBUG RELWITHDEBINFO)
SET(HAVE_C_FSANITIZE ${have_C__fsanitize_address__fPIC})
......@@ -209,15 +208,6 @@ IF (WITH_ASAN)
"-fsanitize=address -fsanitize-address-use-after-scope"
DEBUG RELWITHDEBINFO)
ENDIF()
ELSE()
# older versions of clang
MY_CHECK_AND_SET_COMPILER_FLAG("-faddress-sanitizer -fPIC"
DEBUG RELWITHDEBINFO)
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()
ENDIF()
IF(NOT WITH_ASAN_OK)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment