Skip to content

Commit a080c74

Browse files
authored
[lldb] Add build option to specify the libxml 2 version (#142183)
The Swift Windows toolchain uses its own static build of libxml 2, which is more recent than 2.8, resulting in the provided libxml 2 to be rejected. This change allows to specify a custom version for libxml 2, while defaulting to 2.8.
1 parent 5047a33 commit a080c74

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lldb/cmake/modules/LLDBConfig.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,18 @@ macro(add_optional_dependency variable description package found)
5151
message(STATUS "${description}: ${${variable}}")
5252
endmacro()
5353

54+
set(LLDB_LIBXML2_VERSION "2.8" CACHE STRING
55+
"Specify the version of libxml 2 to use with LLDB. This is only meant to be overridden for local
56+
static builds of libxml 2. Use at your own risk.")
57+
mark_as_advanced(LLDB_LIBXML2_VERSION)
58+
5459
add_optional_dependency(LLDB_ENABLE_SWIG "Enable SWIG to generate LLDB bindings" SWIG SWIG_FOUND VERSION 4)
5560
add_optional_dependency(LLDB_ENABLE_LIBEDIT "Enable editline support in LLDB" LibEdit LibEdit_FOUND)
5661
add_optional_dependency(LLDB_ENABLE_CURSES "Enable curses support in LLDB" CursesAndPanel CURSESANDPANEL_FOUND)
5762
add_optional_dependency(LLDB_ENABLE_LZMA "Enable LZMA compression support in LLDB" LibLZMA LIBLZMA_FOUND)
5863
add_optional_dependency(LLDB_ENABLE_LUA "Enable Lua scripting support in LLDB" LuaAndSwig LUAANDSWIG_FOUND)
5964
add_optional_dependency(LLDB_ENABLE_PYTHON "Enable Python scripting support in LLDB" PythonAndSwig PYTHONANDSWIG_FOUND)
60-
add_optional_dependency(LLDB_ENABLE_LIBXML2 "Enable Libxml 2 support in LLDB" LibXml2 LIBXML2_FOUND VERSION 2.8)
65+
add_optional_dependency(LLDB_ENABLE_LIBXML2 "Enable Libxml 2 support in LLDB" LibXml2 LIBXML2_FOUND VERSION ${LLDB_LIBXML2_VERSION})
6166
add_optional_dependency(LLDB_ENABLE_FBSDVMCORE "Enable libfbsdvmcore support in LLDB" FBSDVMCore FBSDVMCore_FOUND QUIET)
6267

6368
option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" ON)

0 commit comments

Comments
 (0)