[llvm] [llvm][cmake] Error if lldb project is enabled without clang (PR #149055)
David Spickett via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 16 02:59:55 PDT 2025
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/149055
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.
>From 729261689b93784776beb2d1dc64b76180182281 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Wed, 16 Jul 2025 09:57:45 +0000
Subject: [PATCH] [llvm][cmake] Error if lldb project is enabled without clang
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.
---
llvm/CMakeLists.txt | 6 ++++++
1 file changed, 6 insertions(+)
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 "
More information about the llvm-commits
mailing list