You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building a project for a couple of different targets, one within cross and one outside, swapping targets seems to cause the whole project to rebuild. I'm not entirely sure of the mechanism, but, suspect it is either related to changes in the profile (per rust-lang/cargo#4961) or different compiler versions. This would seem to imply the profile is project-global rather than per-target and I haven't dug into this at all.
In case anyone else runs into this, if you only have one target under cross you can work around the issue by placing the project in a workspace then building natively (via cargo build) from the workspace folder and via cross in the project folder (as the docker container cannot see up to the workspace directory) so that the target directories are split, in which case incremental builds work properly. If you need more than one cross target, I'm not sure there's a great option, maybe propagating sccache config / files into the cross container :-/