[llvm] [llvm][cmake] Error if lldb project is enabled without clang (PR #149055)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 16 03:01:14 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: David Spickett (DavidSpickett)
<details>
<summary>Changes</summary>
Fixes https://github.com/llvm/llvm-project/issues/54555
We could do what flang does and enable clang automatically, but I personally prefer making the user make the choice.
Also from a buld requirements perspective, flang is a bigger build than clang. So if you're already set on building flang, clang should be within your budget too. lldb is smaller than clang.
---
Full diff: https://github.com/llvm/llvm-project/pull/149055.diff
1 Files Affected:
- (modified) llvm/CMakeLists.txt (+6)
``````````diff
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 3f8201fa426fe..bf52533abe525 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -179,6 +179,12 @@ if ("flang" IN_LIST LLVM_ENABLE_PROJECTS)
endif ()
endif()
+if ("lldb" IN_LIST LLVM_ENABLE_PROJECTS)
+ if (NOT "clang" IN_LIST LLVM_ENABLE_PROJECTS)
+ message(FATAL_ERROR "Clang is not enabled, but is required for lldb.")
+ endif ()
+endif ()
+
if ("libc" IN_LIST LLVM_ENABLE_PROJECTS)
message(WARNING "Using LLVM_ENABLE_PROJECTS=libc is deprecated. Please use "
"-DLLVM_ENABLE_RUNTIMES=libc or see the instructions at "
``````````
</details>
https://github.com/llvm/llvm-project/pull/149055
More information about the llvm-commits
mailing list