junrushao opened a new pull request, #512:
URL: https://github.com/apache/tvm-ffi/pull/512

   ## Summary
   - **`src/ffi/object.cc`**: Replace `using namespace tvm::ffi;` with a 
namespace alias (`namespace ffi = ::tvm::ffi;`) and fully qualify all type 
names in the static init block. This prevents ambiguous type references (e.g. 
`Object` matching both `tvm::ffi::Object` and `tvm::runtime::Object`) in 
downstream wasm projects that include tvm-ffi sources in a unity build.
   - **`src/ffi/testing/testing.cc`**: Remove the `#define 
TVM_FFI_DLL_EXPORT_INCLUDE_METADATA 1` from the source file to avoid macro 
redefinition warnings in unity builds where the macro is already set by the 
build system.
   - **`CMakeLists.txt`**: Add `target_compile_definitions(tvm_ffi_testing 
PRIVATE TVM_FFI_DLL_EXPORT_INCLUDE_METADATA=1)` so the define is provided via 
the build system instead of hardcoded in source.
   
   ## Test plan
   - [ ] Verify existing C++ tests pass (`ctest` in CI)
   - [ ] Verify downstream wasm unity builds compile without ambiguity errors 
or macro redefinition warnings


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to