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

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


The following commit(s) were added to refs/heads/static-libxml2 by this push:
     new 755e96275a [BUILD] Simplify static libxml2 substitution comment
755e96275a is described below

commit 755e96275acb5b44651573ae3a26a0c4c71a6924
Author: tqchen <[email protected]>
AuthorDate: Mon Jun 1 15:20:38 2026 +0000

    [BUILD] Simplify static libxml2 substitution comment
    
    Replace the 24-line context block with a one-line summary per user
    preference. No functional change.
---
 cmake/modules/LLVM.cmake | 26 ++------------------------
 1 file changed, 2 insertions(+), 24 deletions(-)

diff --git a/cmake/modules/LLVM.cmake b/cmake/modules/LLVM.cmake
index 5c2fd6af76..e3c0e25145 100644
--- a/cmake/modules/LLVM.cmake
+++ b/cmake/modules/LLVM.cmake
@@ -57,30 +57,8 @@ if(NOT ${USE_LLVM} MATCHES ${IS_FALSE_PATTERN})
     src/target/hexagon/llvm/*.cc
   )
 
-  # When USE_STATIC_LIBXML2_FROM_SOURCE=ON, fetch libxml2 in-tree (no
-  # submodule) and substitute the in-tree static `LibXml2` target for the
-  # system libxml2 reference that `llvm-config --system-libs` emits.
-  #
-  # Why this is needed (and is platform-asymmetric):
-  #   - LLVM uses libxml2 only inside lib/WindowsManifest and
-  #     lib/Object/WindowsResource — code paths that parse Windows
-  #     `.manifest` XML / PE resource files.
-  #   - On Linux, TVM never references those LLVM objects, so static-
-  #     archive lazy linking + `-Wl,--as-needed` drop the `-lxml2`
-  #     reference naturally. This filter is then belt-and-braces.
-  #   - On Windows, TVM's PE/COFF codegen path DOES exercise the
-  #     WindowsManifest code, so libxml2 symbols are actually
-  #     referenced. Without this substitution, `tvm_compiler.dll`
-  #     would acquire a runtime dependency on `xml2.dll` (the version
-  #     that mamba / system ship). This filter is the actual mechanism
-  #     that makes the Windows static build self-contained.
-  #
-  # The regex `[Xx][Mm][Ll]2` matches the common shapes llvm-config can
-  # emit across toolchains: `-lxml2`, full paths like
-  # `/usr/lib/.../libxml2.a` or `/path/.../xml2.lib`, and case-varying
-  # Windows entries. If a future toolchain returns libxml2 via a
-  # different name (e.g. `libxml2_static.lib`), broaden this regex
-  # accordingly.
+  # When USE_STATIC_LIBXML2_FROM_SOURCE=ON, we will instead link against
+  # in-tree compiled libxml2 and remove the xml2 deps from existing 
llvm-config.
   if(USE_STATIC_LIBXML2_FROM_SOURCE)
     include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/utils/CompileStaticLibXml2.cmake)
     _libxml2compile()

Reply via email to