Don't search libxml2 if using msan. LLVM already has similar check.

llvm-svn: 312407
This commit is contained in:
Vitaly Buka 2017-09-02 03:53:42 +00:00
parent 9517517075
commit 3d8e509fd7
1 changed files with 8 additions and 4 deletions

View File

@ -181,10 +181,14 @@ endif()
# we can include cmake files from this directory.
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
set (LIBXML2_FOUND 0)
find_package(LibXml2 2.5.3 QUIET)
if (LIBXML2_FOUND)
set(CLANG_HAVE_LIBXML 1)
# 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.*")
set (LIBXML2_FOUND 0)
find_package(LibXml2 2.5.3 QUIET)
if (LIBXML2_FOUND)
set(CLANG_HAVE_LIBXML 1)
endif()
endif()
include(CheckIncludeFile)