[CMake/ASan] Skip using libedit if ASan is enabled -- it leaks memory.
authorChandler Carruth <chandlerc@gmail.com>
Sat, 20 Aug 2016 07:05:13 +0000 (07:05 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 20 Aug 2016 07:05:13 +0000 (07:05 +0000)
Note that you'll have to clear this variable from your CMake cache for
it to take effect.

llvm-svn: 279362

llvm/cmake/config-ix.cmake

index d4c8c8d..e16aefa 100755 (executable)
@@ -128,7 +128,8 @@ if( NOT PURE_WINDOWS AND NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
   else()
     set(HAVE_LIBZ 0)
   endif()
-  if (HAVE_HISTEDIT_H)
+  # Skip libedit if using ASan as it contains memory leaks.
+  if (HAVE_HISTEDIT_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*")
     check_library_exists(edit el_init "" HAVE_LIBEDIT)
   endif()
   if(LLVM_ENABLE_TERMINFO)