llvm-project/lldb/source
Jonas Devlieghere 94b1bc0fb8 Re-land "[lldb/CMake] Change how we deal with optional dependencies"
Recently there has been some discussion about how we deal with optional
dependencies in LLDB. The approach in LLVM is to make things work out of
the box. If the dependency isn't there, we move on silently.

That's not true for LLDB. Unless you explicitly disable the dependency
with LLDB_ENABLE_*, you'll get a configuration-time error. The
historical reason for this is that LLDB's dependencies have a much
broader impact, think about Python for example which is required to run
the test suite.

The current approach can be frustrating from a user experience
perspective. Sometimes you just want to ensure LLDB builds with a change
in clang.

This patch changes the optional dependencies (with the exception of
Python) to a new scheme. The LLDB_ENABLE_* now takes three values: On,
Off or Auto, with the latter being the default. On and Off behave the
same as today, forcing the dependency to be enabled or disabled. If the
dependency is set to On but is not found, it results in a configuration
time warning. For Auto we detect if the dependency is there and either
enable or disable it depending on whether it's found.

Differential revision: https://reviews.llvm.org/D71306

PS: The reason Python isn't included yet is because it's so pervasive
that I plan on doing that in a separate patch.
2019-12-20 20:05:04 -08:00
..
API [lldb/Lua] Add Boilerplate for a Lua Script Interpreter 2019-12-19 10:13:51 -08:00
Breakpoint [lldb][NFC] Migrate FileSpec::Dump to raw_ostream 2019-12-06 09:40:42 +01:00
Commands [lldb][NFC] Remove unnecessary includes in source/Commands 2019-12-16 08:59:08 +01:00
Core Re-land "[lldb/CMake] Change how we deal with optional dependencies" 2019-12-20 20:05:04 -08:00
DataFormatters TypeCategory: Initialize m_enabled to false 2019-12-12 11:39:41 -08:00
Expression [lldb/DWARF] Switch to llvm location list parser 2019-12-09 13:39:10 +01:00
Host [lldb] Make that we can call HostInfo::Initialize and HostInfo::Terminate multiple times 2019-12-20 12:52:06 +01:00
Initialization [Reproducer] Use ::rtrim() to remove trailing control characters. 2019-10-18 17:11:48 +00:00
Interpreter [lldb/Lua] Add Boilerplate for a Lua Script Interpreter 2019-12-19 10:13:51 -08:00
Plugins Rename DW_AT_LLVM_isysroot to DW_AT_LLVM_sysroot 2019-12-20 13:11:17 -08:00
Symbol [lldb][NFC] Remove redundant ASTContext args to CopyDecl/DeportDecl 2019-12-20 18:45:14 +01:00
Target In 'thread step-out' command, only insert a breakpoint in executable memory. 2019-12-20 11:02:24 -08:00
Utility [lldb][NFC] Make clang-format happy by removing trailing space in ArchSpec.cpp 2019-12-17 09:13:48 +01:00
CMakeLists.txt [CMake] Remove Apple-specific version logic. 2019-04-17 18:23:22 +00:00
lldb.cpp [CMake] Remove Apple-specific version logic. 2019-04-17 18:23:22 +00:00