[PATCH] D26550: Add an option to disable libedit

Yichao Yu via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 17:35:41 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL287293: Add an option to disable libedit (authored by yuyichao).

Changed prior to commit:
  https://reviews.llvm.org/D26550?vs=77621&id=78443#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26550

Files:
  llvm/trunk/CMakeLists.txt
  llvm/trunk/cmake/config-ix.cmake


Index: llvm/trunk/CMakeLists.txt
===================================================================
--- llvm/trunk/CMakeLists.txt
+++ llvm/trunk/CMakeLists.txt
@@ -357,6 +357,8 @@
 
 option(LLVM_ENABLE_TERMINFO "Use terminfo database if available." ON)
 
+option(LLVM_ENABLE_LIBEDIT "Use libedit if available." ON)
+
 option(LLVM_ENABLE_THREADS "Use threads if available." ON)
 
 option(LLVM_ENABLE_ZLIB "Use zlib for compression/decompression if available." ON)
Index: llvm/trunk/cmake/config-ix.cmake
===================================================================
--- llvm/trunk/cmake/config-ix.cmake
+++ llvm/trunk/cmake/config-ix.cmake
@@ -119,8 +119,10 @@
     set(HAVE_LIBZ 0)
   endif()
   # Skip libedit if using ASan as it contains memory leaks.
-  if (HAVE_HISTEDIT_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*")
+  if (LLVM_ENABLE_LIBEDIT AND HAVE_HISTEDIT_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*")
     check_library_exists(edit el_init "" HAVE_LIBEDIT)
+  else()
+    set(HAVE_LIBEDIT 0)
   endif()
   if(LLVM_ENABLE_TERMINFO)
     set(HAVE_TERMINFO 0)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26550.78443.patch
Type: text/x-patch
Size: 1087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161118/1aaabfa3/attachment.bin>


More information about the llvm-commits mailing list