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

   ## Why
   
   `tvm-ffi-sys/build.rs` links `tvm_ffi_testing` unconditionally, so every 
crate that depends on tvm-ffi asks the linker for the testing library. Only the 
tvm-ffi tests use it, for the `testing.*` global functions it registers. With 
`--as-needed` the library usually drops out of the final binary, but a 
downstream build still needs it present at link time, and the link line doesn't 
reflect what the crate uses.
   
   ## What
   
   - `tvm-ffi-sys` gets a `testing` feature, off by default. Its build script 
links `tvm_ffi_testing` only when the feature is enabled.
   - `tvm-ffi` enables the feature through a dev-dependency on `tvm-ffi-sys`, 
so its tests, which run with resolver 2, still link the testing library.
   
   ## Tests
   
   - `cargo test` in `rust/` passes; all 24 suites pass.
   - A scratch downstream crate that depends on `tvm-ffi`, built with `cargo 
build -vv`:
     - on `main`, `rustc-link-lib=dylib=tvm_ffi` and 
`rustc-link-lib=dylib=tvm_ffi_testing`;
     - with this change, only `rustc-link-lib=dylib=tvm_ffi`.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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