Skip to content

Commit e66eabe

Browse files
[llvm][cmake] Add clang if not already present when building lldb (#149055)
Fixes #54555 This follows flang's pattern, it adds clang if you don't have it in LLVM_ENABLE_PROJECTS.
1 parent d871702 commit e66eabe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,13 @@ 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(STATUS "Enabling clang as a dependency of lldb")
185+
list(APPEND LLVM_ENABLE_PROJECTS "clang")
186+
endif()
187+
endif ()
188+
182189
if ("libc" IN_LIST LLVM_ENABLE_PROJECTS)
183190
message(WARNING "Using LLVM_ENABLE_PROJECTS=libc is deprecated. Please use "
184191
"-DLLVM_ENABLE_RUNTIMES=libc or see the instructions at "

0 commit comments

Comments
 (0)