This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 3ff16e8253 [Fix] Add libxml2 dependency to fix Windows CI build 
failure (#18296)
3ff16e8253 is described below

commit 3ff16e8253f3f782ee73102c28849db87322e009
Author: Shushi Hong <[email protected]>
AuthorDate: Tue Sep 9 19:12:15 2025 -0400

    [Fix] Add libxml2 dependency to fix Windows CI build failure (#18296)
---
 .github/workflows/main.yml   | 2 +-
 cmake/utils/FindLLVM.cmake   | 4 ++++
 conda/build-environment.yaml | 1 +
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d1934eade4..7b55dade14 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -110,7 +110,7 @@ jobs:
       - name: Install LLVM dependencies
         shell: cmd /C call {0}
         run: |
-          conda install -c conda-forge llvmdev cmake ninja zlib
+          conda install -c conda-forge llvmdev cmake ninja zlib libxml2-devel
       - name: Install TVM
         shell: cmd /C call {0}
         run: |
diff --git a/cmake/utils/FindLLVM.cmake b/cmake/utils/FindLLVM.cmake
index 2a243b06c8..09f4dcca7f 100644
--- a/cmake/utils/FindLLVM.cmake
+++ b/cmake/utils/FindLLVM.cmake
@@ -219,6 +219,10 @@ macro(find_llvm use_llvm)
         # If the library file ends in .lib try to also search the llvm_libdir
         message(STATUS "LLVM linker flag under LLVM libdir: 
${__llvm_libdir}/${__flag}")
         list(APPEND LLVM_LIBS "${__llvm_libdir}/${__flag}")
+      elseif((__flag MATCHES ".lib$") AND (EXISTS 
"${__llvm_libdir}/lib${__flag}"))
+        # If the library file ends in .lib try to also search the llvm_libdir 
with lib prefix
+        message(STATUS "LLVM linker flag under LLVM libdir: 
${__llvm_libdir}/lib${__flag}")
+        list(APPEND LLVM_LIBS "${__llvm_libdir}/lib${__flag}")
       else()
         message(STATUS "LLVM linker flag: ${__flag}")
         list(APPEND LLVM_LIBS "${__flag}")
diff --git a/conda/build-environment.yaml b/conda/build-environment.yaml
index f421404b34..28650499ea 100644
--- a/conda/build-environment.yaml
+++ b/conda/build-environment.yaml
@@ -37,3 +37,4 @@ dependencies:
   - numpy
   - scipy
   - cython
+  - libxml2-devel

Reply via email to