[PATCH] D48459: Respect CMAKE_SYSROOT and CMAKE_CROSSCOMPILING when searching for libxml2.
Stephen Hines via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 21 15:00:44 PDT 2018
srhines created this revision.
Herald added a subscriber: mgorny.
If we ignore these variables, we end up always using the host
information for libxml2, when it is not appropriate. This makes builds
less hermetic than they should ideally be.
Repository:
rC Clang
https://reviews.llvm.org/D48459
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -186,7 +186,9 @@
# Don't look for libxml if we're using MSan, since uninstrumented third party
# code may call MSan interceptors like strlen, leading to false positives.
-if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
+# Similarly, don't look for libxml on the host if we have a specific sysroot or
+# are cross-compiling.
+if(NOT CMAKE_SYSROOT AND NOT CMAKE_CROSSCOMPILING AND NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
set (LIBXML2_FOUND 0)
find_package(LibXml2 2.5.3 QUIET)
if (LIBXML2_FOUND)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48459.152390.patch
Type: text/x-patch
Size: 639 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180621/8a977cb3/attachment.bin>
More information about the cfe-commits
mailing list