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-ffi.git
The following commit(s) were added to refs/heads/main by this push:
new 3e906bc6 [BUILD] Propagate TVM_FFI_EXPORTS to static library consumers
(#890)
3e906bc6 is described below
commit 3e906bc685ea45624bc80e8d7b7d86497d492af3
Author: miyan <[email protected]>
AuthorDate: Thu Nov 5 00:37:49 2026 +0800
[BUILD] Propagate TVM_FFI_EXPORTS to static library consumers (#890)
This PR propagates `TVM_FFI_EXPORTS` from the `tvm_ffi_static` target as
an `INTERFACE` definition. Static consumers bundle TVM FFI rather than
import it from a DLL, so their declarations now match the `dllexport`
definitions already compiled into the static archive.
Users who bundle TVM FFI and want their own symbol hiding can compile
the sources directly and override `TVM_FFI_DLL`.
---------
Co-authored-by: tqchen <[email protected]>
---
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index becf6201..bf14bbb3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -129,6 +129,7 @@ endif ()
tvm_ffi_add_msvc_flags(tvm_ffi_objs)
tvm_ffi_add_target_from_obj(tvm_ffi tvm_ffi_objs)
+target_compile_definitions(tvm_ffi_static INTERFACE TVM_FFI_EXPORTS)
if (TVM_FFI_USE_THREADS)
find_package(Threads REQUIRED)