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)
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)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits