[lldb-dev] Fwd: [Lldb-commits] Optional Dependencies in LLDB
Jonas Devlieghere via lldb-dev
lldb-dev at lists.llvm.org
Mon Jan 6 13:38:37 PST 2020
Hey Greg,
On Mon, Jan 6, 2020 at 12:28 PM Greg Clayton <clayborg at gmail.com> wrote:
>
> editline seems like a bad example as being optional as I wouldn't want to use a LLDB that doesn't have editline support. Or are we taking care of this by having the cmake settings files (lldb/cmake/caches/*.cmake) for each system contain the right invocations and most people are expected to use those?
This argument could be made for most of the optional dependencies.
Having said that, there are also use cases where you don't care about
editline at all. Think about people making changes to the clang
APIwant to build LLDB to ensure they didn't break anything. As a
developer, you'll have the dependencies whether they're mandatory or
not, so nothing really changes. This does become important when you're
planning to distribute lldb, which is where I think the caches are an
excellent idea.
> Is there an easy way to show all of the LLDB_ENABLE_* values or do we need to search all CMakeLists.txt for this value?
They're currently only listed in LLDBConfig.cmake
add_optional_dependency(LLDB_ENABLE_LIBEDIT ...
add_optional_dependency(LLDB_ENABLE_CURSES ...
add_optional_dependency(LLDB_ENABLE_LZMA ...
add_optional_dependency(LLDB_ENABLE_LUA ...
add_optional_dependency(LLDB_ENABLE_PYTHON ...
I'll add an entry on the build page to make this easier to discover.
Thanks for bringing this up!
> > On Jan 6, 2020, at 11:15 AM, Jonas Devlieghere via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> >
> > Hey everyone,
> >
> > I just wanted to let you know that most of the work is complete for
> > auto-detecting optional dependencies in LLDB. Unless explicitly
> > specified, optional dependencies like editline will be enabled when
> > available and disabled otherwise. This is different from the old
> > behavior, where optional dependencies were that were enabled by
> > default would cause an error at configuration time. The motivation is
> > to make it easier to build LLDB by making things "just work" out of
> > the box.
> >
> > All optional dependencies are now controlled by an LLDB_ENABLE_* CMake
> > flag. The default value for these variables is "Auto", which causes
> > the dependency to be enabled based on whether it was found. It's still
> > possible to obtain the old behavior by setting the corresponding CMake
> > variable to "On" or "Off" respectively.
> >
> > If you have a configuration where you were depending on the old
> > behavior where the dependency being enabled or disabled by default,
> > you might want to consider passing LLDB_ENABLE_*=On/Off to CMake to
> > ensure the dependency is required or ignored respectively.
> >
> > TL;DR Optional dependencies in LLDB are controlled by LLDB_ENABLE_*
> > CMake flags and are auto-detected by default. You can return to the
> > old behavior by setting the variables to "On" or "Off" respectively.
> > _______________________________________________
> > lldb-commits mailing list
> > lldb-commits at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
More information about the lldb-dev
mailing list