Skip to content

Commit 7292616

Browse files
committed
[llvm][cmake] Error if lldb project is enabled without clang
Fixes #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.
1 parent 5009613 commit 7292616

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ if ("flang" IN_LIST LLVM_ENABLE_PROJECTS)
179179
endif ()
180180
endif()
181181

182+
if ("lldb" IN_LIST LLVM_ENABLE_PROJECTS)
183+
if (NOT "clang" IN_LIST LLVM_ENABLE_PROJECTS)
184+
message(FATAL_ERROR "Clang is not enabled, but is required for lldb.")
185+
endif ()
186+
endif ()
187+
182188
if ("libc" IN_LIST LLVM_ENABLE_PROJECTS)
183189
message(WARNING "Using LLVM_ENABLE_PROJECTS=libc is deprecated. Please use "
184190
"-DLLVM_ENABLE_RUNTIMES=libc or see the instructions at "

0 commit comments

Comments
 (0)