diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index dc9bd153881..6c8ec512ef7 100644 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -158,7 +158,7 @@ if( NOT PURE_WINDOWS AND NOT LLVM_USE_SANITIZER MATCHES "Memory.*") set(LLVM_LIBXML2_ENABLED 0) set(LIBXML2_FOUND 0) - if(LLVM_ENABLE_LIBXML2) + if(LLVM_ENABLE_LIBXML2 AND CMAKE_SYSTEM_NAME MATCHES "Linux") find_package(LibXml2) if (LIBXML2_FOUND) set(LLVM_LIBXML2_ENABLED 1)