[PATCH] D48458: Respect CMAKE_SYSROOT and don't search out libxml2 if it is set.

Stephen Hines via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 15:00:18 PDT 2018


srhines created this revision.
Herald added a subscriber: mgorny.

If we ignore CMAKE_SYSROOT here, 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:
  rL LLVM

https://reviews.llvm.org/D48458

Files:
  cmake/config-ix.cmake


Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -144,7 +144,7 @@
     find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2 c)
     set(LLVM_LIBXML2_ENABLED 0)
     set(LIBXML2_FOUND 0)
-    if((LLVM_ENABLE_LIBXML2) AND ((CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) OR APPLE))
+    if((LLVM_ENABLE_LIBXML2) AND ((CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) OR APPLE) AND NOT CMAKE_SYSROOT)
       find_package(LibXml2)
       if (LIBXML2_FOUND)
         set(LLVM_LIBXML2_ENABLED 1)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48458.152389.patch
Type: text/x-patch
Size: 628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180621/229ff6ad/attachment.bin>


More information about the llvm-commits mailing list