[llvm] r287293 - Add an option to disable libedit
Yichao Yu via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 17 17:25:50 PST 2016
Author: yuyichao
Date: Thu Nov 17 19:25:49 2016
New Revision: 287293
URL: http://llvm.org/viewvc/llvm-project?rev=287293&view=rev
Log:
Add an option to disable libedit
Summary: 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.
Reviewers: pcc, beanz
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D26550
Modified:
llvm/trunk/CMakeLists.txt
llvm/trunk/cmake/config-ix.cmake
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=287293&r1=287292&r2=287293&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Thu Nov 17 19:25:49 2016
@@ -357,6 +357,8 @@ set(LLVM_TARGET_ARCH "host"
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)
Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=287293&r1=287292&r2=287293&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Thu Nov 17 19:25:49 2016
@@ -119,8 +119,10 @@ if( NOT PURE_WINDOWS AND NOT LLVM_USE_SA
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)
More information about the llvm-commits
mailing list