Open
Description
I compile my project to an object file I then want to link with non-Rust files:
cargo rustc --release -Z build-std=core -- --emit obj=my-project.o
But sometimes I remove all object files in my project dir. I then want to rebuild my project without changing the source but cargo doesn't emit the object file.
cargo clean -p my-project && cargo rustc ...
Cleaning and building again by running the command above doesn't work. It only emits a new binary file (to the target
dir) if I remove it. It may be related to the fact that I build the core
library. That's because the binary is emitted to target/target/release
not target/release
as usual.
What can I do to force cargo to rebuild the project? I don't want to clean the whole target
dir since I'd have to rebuild the core
crate each time.