From 66d1f1aff456398744a1264881c4d643cdce0956 Mon Sep 17 00:00:00 2001 From: Ruihang Lai Date: Mon, 9 Feb 2026 16:25:41 -0500 Subject: [PATCH] fix: skip dsymutil for static tvm_runtime on Apple platforms dsymutil cannot process static libraries (.a files), causing the build to fail when building tvm_runtime as a static library for iOS. Only run dsymutil on tvm_runtime when building the shared library variant. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa03e5f470e9..4af253f47a66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -759,7 +759,10 @@ if(TVM_IS_DEBUG_BUILD) endif() tvm_ffi_add_apple_dsymutil(tvm) -tvm_ffi_add_apple_dsymutil(tvm_runtime) +# Only run dsymutil on shared libraries, not static libraries +if(NOT BUILD_STATIC_RUNTIME) + tvm_ffi_add_apple_dsymutil(tvm_runtime) +endif() if(BUILD_FOR_HEXAGON) # Wrap pthread_create to allow setting custom stack size.