Description
I've done some searching in the issues on the cargo repo and haven't seen anything related to this -- if this is a duplicate please forgive me.
Has anyone ever proposed the use of an intermediate directory under target
but above debug
/release
which is specific to a set of flags/build options? Something like target/HASH_OF_INPUTS/debug
?
There are a couple of situations where I've recently found myself toggling flags on and off for both debug and release builds, where triggering a full rebuild is problematic:
- Measuring performance of different code changes with LTO on and then off, debuginfo on and then off, etc.
- Performing general compiler-driven coding, followed by running line coverage on tests. This means passing
no-gc-sections
in flags, where I wouldn't want that to be the default in my development environment.
Both of these workflows depend on comparing the effects small code changes across different sets of flags, but to do so currently kicks off a full rebuild of dependencies (which is a really killer amount of time to spend in between edits).
From a user's perspective, I can see a definite downside from disk usage growing as they experiment with different flags. At the same time, it would be nice to have these kinds of workflows "just work" without needing full dependency rebuilds or having to play games with CARGO_TARGET_DIR
.
Hopefully I'm making sense here. Thoughts?