[all-commits] [llvm/llvm-project] 7a4c85: [cmake] FindLibXml2: fall back to xmlversion.h whe...
Sampath Vutkoori via All-commits
all-commits at lists.llvm.org
Wed Jul 8 08:34:19 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7a4c856d55d7b0e7f546cf12fb9b065af46762e7
https://github.com/llvm/llvm-project/commit/7a4c856d55d7b0e7f546cf12fb9b065af46762e7
Author: Sampath Vutkoori <svutkoor at qti.qualcomm.com>
Date: 2026-07-08 (Wed, 08 Jul 2026)
Changed paths:
M llvm/cmake/modules/FindLibXml2.cmake
Log Message:
-----------
[cmake] FindLibXml2: fall back to xmlversion.h when pkg-config has no… (#207797)
… version
LLVM's cmake/modules/FindLibXml2.cmake uses PC_LIBXML_VERSION (from
pkg-config) as the VERSION_VAR in find_package_handle_standard_args.
When pkg-config has no libxml-2.0.pc file (e.g. when linking against a
static libxml2-pic.a that ships no .pc file), PC_LIBXML_VERSION is left
empty after pkg_check_modules fails and the >=2.8 version check reports
'Found unsuitable version ""', causing LLDB_ENABLE_LIBXML2 to be set to
FALSE.
Fix: before calling find_package_handle_standard_args, check whether
PC_LIBXML_VERSION is still empty and if so read LIBXML_DOTTED_VERSION
from the xmlversion.h header. This mirrors the version-detection logic
in the system CMake FindLibXml2 module and ensures LLDB is built with
libxml2 support on installations that use a static libxml2 without a .pc
file.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list