Closed as duplicate of#6313
Description
Problem
Hi, let's imagine I have this siutation:
workspace:
- Cargo.toml (members:
[crates/*]
) - crates
- lib/Cargo.toml
- macro/Cargo.toml
- helper/Cargo.toml
Now, lib
imports helper
and macro
imports helper
. When I build it, cargo tells me:
output filename collision.
The lib target `helper` in package `helper v1.0.0 (<mylib>/crates/helper)` has the same output filename as the lib target `helper` in package `helper v1.0.0 (<mylib>/crates/helper)`.
Colliding filename is: <mylib>/target/release/deps/libhelper.rlib
The targets should have unique names.
And I believe this is because lib and macro use other rustc config to compile their targets. What to do in this situation?
Steps
- Replicate struct shown above.
Possible Solution(s)
None so far
Notes
No response
Version
cargo 1.85.0-nightly (c86f4b3a1 2024-12-24)