diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake b/clang/cmake/caches/Fuchsia-stage2.cmake --- a/clang/cmake/caches/Fuchsia-stage2.cmake +++ b/clang/cmake/caches/Fuchsia-stage2.cmake @@ -4,7 +4,7 @@ set(PACKAGE_VENDOR Fuchsia CACHE STRING "") -set(LLVM_ENABLE_PROJECTS "bolt;clang;clang-tools-extra;lld;llvm;polly" CACHE STRING "") +set(_FUCHSIA_ENABLE_PROJECTS "bolt;clang;clang-tools-extra;lld;llvm;polly") set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "") set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "") @@ -321,7 +321,7 @@ scan-build-py CACHE STRING "") -set(LLVM_DISTRIBUTION_COMPONENTS +set(_FUCHSIA_DISTRIBUTION_COMPONENTS clang lld clang-apply-replacements @@ -336,5 +336,13 @@ find-all-symbols builtins runtimes - ${LLVM_TOOLCHAIN_TOOLS} - CACHE STRING "") + ${LLVM_TOOLCHAIN_TOOLS}) + +set(FUCHSIA_ENABLE_LLDB OFF CACHE BOOL "Enable LLDB") +if(FUCHSIA_ENABLE_LLDB) + list(APPEND _FUCHSIA_ENABLE_PROJECTS "lldb") + list(APPEND _FUCHSIA_DISTRIBUTION_COMPONENTS "lldb") +endif() + +set(LLVM_ENABLE_PROJECTS ${_FUCHSIA_ENABLE_PROJECTS} CACHE STRING "") +set(LLVM_DISTRIBUTION_COMPONENTS ${_FUCHSIA_DISTRIBUTION_COMPONENTS} CACHE STRING "")