[all-commits] [llvm/llvm-project] 41d7c2: [lldb/CMake] Change how we deal with optional depe...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Fri Dec 20 14:14:09 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 41d7c227b38cce397e0402765593158f4bdf2dee
      https://github.com/llvm/llvm-project/commit/41d7c227b38cce397e0402765593158f4bdf2dee
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2019-12-20 (Fri, 20 Dec 2019)

  Changed paths:
    A lldb/cmake/modules/FindCursesAndPanel.cmake
    M lldb/cmake/modules/LLDBConfig.cmake
    M lldb/test/CMakeLists.txt

  Log Message:
  -----------
  [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.




More information about the All-commits mailing list