[PATCH] D26550: Add an option to disable libedit

Yichao Yu via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 11 08:25:01 PST 2016


yuyichao created this revision.
yuyichao added reviewers: pcc, beanz.
yuyichao added a subscriber: llvm-commits.
Herald added a subscriber: mgorny.

This should provide the function similar to `--disable-libedit` with the autotools build system, which seems to be missing from the commit (r200595) that adds this.


https://reviews.llvm.org/D26550

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


Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ 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)
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -343,6 +343,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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26550.77621.patch
Type: text/x-patch
Size: 1021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161111/54cc476d/attachment.bin>


More information about the llvm-commits mailing list