Skip to main content

trim_paths_remap

Function trim_paths_remap 

Source
pub(crate) fn trim_paths_remap(
    build_runner: &BuildRunner<'_, '_>,
    unit: &Unit,
) -> [OsString; 3]
Expand description

Computes the <from>=<to> path remap pairs for RFC 3127 trim-paths.

Order of --remap-path-prefix flags is important for -Zbuild-std. We want to show /rustc/<hash>/library/std instead of std-0.0.0.

CategoryFromTo
Sysroot<sysroot>/lib/rustlib/src/rust/rustc/<commit-hash>
Registry dep$CARGO_HOME/registry/src/<registry-dir>/cargo/registry/<registry-id>
Git dep$CARGO_HOME/git/checkouts/<repo-dir>/<rev-dir>/cargo/git/<git-source-id>/<rev>
Workspace<workspace-root>. (workspace-relative)
Path dep† <pkg-root>/cargo/deps/<name>-<version>
Vendored<pkg-root> (by file location)workspace or path rules above
Build dir<build-dir>/cargo/build-dir

: path dependencies outside the workspace and other uncategorized dependencies.