[LLDB] Ensure LLDB symbols are exported in LLDB_EXPORT_ALL_SYMBOLS is provided.
authorwalter erquinigo <walter@modular.com>
Mon, 3 Apr 2023 16:32:53 +0000 (11:32 -0500)
committerwalter erquinigo <walter@modular.com>
Mon, 3 Apr 2023 20:41:02 +0000 (15:41 -0500)
commite538c6fc3048e1fb1a58da879275d6804186856e
treecf1a340ce8f3f3c9eecad57088ef09793f696ba4
parent64549f0903e244fbe2e7f0131698334b6e45dc10
[LLDB] Ensure LLDB symbols are exported in LLDB_EXPORT_ALL_SYMBOLS is provided.

If we want to export all lldb symbols (i.e LLDB_EXPORT_ALL_SYMBOLS=ON), we need to use default visibility for all LLDB libraries even if a global CMAKE_CXX_VISIBILITY_PRESET=hidden is present. In fact, there are cases in which a global llvm configuration wants CMAKE_CXX_VISIBILITY_PRESET as hidden but simultaneously LLDB_EXPORT_ALL_SYMBOLS=ON is also needed to be able to develop out-of-tree lldb plugins.

Differential Revision: https://reviews.llvm.org/D147453
lldb/cmake/modules/AddLLDB.cmake