async fn relocate_artifacts(
artifacts: Vec<ArtifactPath>,
tmp_root: &Path,
release_override: Option<&str>,
) -> Result<Vec<ArtifactPath>>Expand description
Copy each artifact from its path inside tmp_root to the corresponding
path under target/, creating parent directories as needed, and return
updated ArtifactPaths pointing at the new stable locations.
When --target-dir <tmpdir> is passed to cargo build, artifacts land at
<tmpdir>/<triple>/release/<name>. Stripping the tmpdir prefix and
prepending target/ gives the canonical path target/<triple>/release/<name>,
which is where a normal cargo build --target <triple> would place them.
When release_override is set (e.g. "release-no-default"), the release
component in the destination path is replaced, so artifacts from builds
with different feature flags do not overwrite each other.