https://github.com/efriedma-quic created 
https://github.com/llvm/llvm-project/pull/237776

Fix CMake variable type and documentation for LLVM_ENABLE_LIBEDIT to match 
what's actually implemented. (See 7d89e6c1c0a01c959beddab643e39d2bc4c2c97d .)

>From 18d3ac4ed920617ffa63959a2a709233d6bfed9c Mon Sep 17 00:00:00 2001
From: Eli Friedman <[email protected]>
Date: Sun, 1 Nov 2026 13:17:48 -0800
Subject: [PATCH] [CMake] Clean up LLVM_ENABLE_LIBEDIT

Fix CMake variable type and documentation for LLVM_ENABLE_LIBEDIT to
match what's actually implemented.  (See
7d89e6c1c0a01c959beddab643e39d2bc4c2c97d .)
---
 clang/cmake/caches/Fuchsia-stage2.cmake |  6 +++---
 clang/cmake/caches/Fuchsia.cmake        |  8 ++++----
 llvm/CMakeLists.txt                     |  2 +-
 llvm/docs/CMake.md                      | 10 +++++-----
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake 
b/clang/cmake/caches/Fuchsia-stage2.cmake
index 4be399609a3dff..c0dd7009ab49b4 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -14,7 +14,7 @@ set(LLVM_ENABLE_DIA_SDK OFF CACHE BOOL "")
 set(LLVM_ENABLE_FATLTO ON CACHE BOOL "")
 set(LLVM_ENABLE_HTTPLIB ON CACHE BOOL "")
 set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "")
-set(LLVM_ENABLE_LIBEDIT OFF CACHE BOOL "")
+set(LLVM_ENABLE_LIBEDIT OFF CACHE STRING "")
 set(LLVM_ENABLE_LLD ON CACHE BOOL "")
 set(LLVM_ENABLE_LTO ON CACHE BOOL "")
 set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "")
@@ -27,8 +27,8 @@ set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
 set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
 set(LLVM_STATIC_LINK_CXX_STDLIB ON CACHE BOOL "")
 set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "")
-set(LLDB_ENABLE_CURSES OFF CACHE BOOL "")
-set(LLDB_ENABLE_LIBEDIT OFF CACHE BOOL "")
+set(LLDB_ENABLE_CURSES OFF CACHE STRING "")
+set(LLDB_ENABLE_LIBEDIT OFF CACHE STRING "")
 
 if(WIN32)
   set(FUCHSIA_DISABLE_DRIVER_BUILD ON)
diff --git a/clang/cmake/caches/Fuchsia.cmake b/clang/cmake/caches/Fuchsia.cmake
index 4dee06d9f51650..a0337d4c10b87e 100644
--- a/clang/cmake/caches/Fuchsia.cmake
+++ b/clang/cmake/caches/Fuchsia.cmake
@@ -9,8 +9,8 @@ set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
 set(_FUCHSIA_ENABLE_PROJECTS "bolt;clang;clang-tools-extra;lld;llvm;polly")
 
 set(LLVM_ENABLE_DIA_SDK OFF CACHE BOOL "")
-set(LLVM_ENABLE_LIBEDIT OFF CACHE BOOL "")
-set(LLVM_ENABLE_LIBXML2 OFF CACHE BOOL "")
+set(LLVM_ENABLE_LIBEDIT OFF CACHE STRING "")
+set(LLVM_ENABLE_LIBXML2 OFF CACHE STRING "")
 set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "")
 set(LLVM_ENABLE_UNWIND_TABLES OFF CACHE BOOL "")
 set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "")
@@ -18,8 +18,8 @@ set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
 set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
 set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
 set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "")
-set(LLDB_ENABLE_CURSES OFF CACHE BOOL "")
-set(LLDB_ENABLE_LIBEDIT OFF CACHE BOOL "")
+set(LLDB_ENABLE_CURSES OFF CACHE STRING "")
+set(LLDB_ENABLE_LIBEDIT OFF CACHE STRING "")
 
 # Passthrough stage1 flags to stage1.
 set(_FUCHSIA_BOOTSTRAP_PASSTHROUGH
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 4a3e307e4ab0a3..fc60c806bc1bc9 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -642,7 +642,7 @@ set(LLVM_ENABLE_LIBXML2 "ON" CACHE STRING "Use libxml2 if 
available. Can be ON,
 
 set(LLVM_USE_STATIC_LIBXML2 "OFF" CACHE BOOL "Use static version of libxml2. 
Can be ON, or OFF")
 
-option(LLVM_ENABLE_LIBEDIT "Use libedit if available." ON)
+set(LLVM_ENABLE_LIBEDIT "ON" CACHE STRING "Use libedit if available. Can be 
ON, OFF, or FORCE_ON")
 
 option(LLVM_ENABLE_LIBPFM "Use libpfm for performance counters if available." 
ON)
 
diff --git a/llvm/docs/CMake.md b/llvm/docs/CMake.md
index 1d5fdb1fd361a1..51133487d9ffea 100644
--- a/llvm/docs/CMake.md
+++ b/llvm/docs/CMake.md
@@ -584,13 +584,13 @@ sub-projects. Nearly all of these variable names begin 
with `LLVM_`.
     is passed to invocations of both so that the project is built using libc++
     instead of stdlibc++. Defaults to OFF.
 
-**LLVM_ENABLE_LIBEDIT**:BOOL
+**LLVM_ENABLE_LIBEDIT**:STRING
 
 :   Controls whether to enable libedit support for command-line editing and
-    history in LLVM tools. When `ON`, forces libedit support to be enabled and
-    will cause a CMake configuration error if libedit cannot be found. When
-    `OFF`, disables libedit support entirely. If not specified, LLVM will
-    auto-detect libedit availability. Defaults to auto-detection.
+    history in LLVM tools. When `FORCE_ON`, forces libedit support to be
+    enabled and will cause a CMake configuration error if libedit cannot be
+    found. When `OFF`, disables libedit support entirely. If not specified or
+    set to `ON`, LLVM will auto-detect libedit availability. Defaults to `ON`.
 
 **LLVM_ENABLE_LIBPFM**:BOOL
 

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to