---
# System prepended metadata

title: Track what gets remapped by `-Ztrim-paths`

---

# Track what gets remapped by `-Ztrim-paths`

The goal of `-Ztrim-paths` ([RFC 3127](https://rust-lang.github.io/rfcs/3127-trim-paths.html)) is to maximize the usability of debuginfo files, while avoid privacy data of build host information in the final build products that are going to be distributed to users.

Since every platform has its own format of binaries and debuginfo files, we track what are covered by `-Ztrim-paths` on each platform separately.

> Note: Due to limited resources, we focus on tier-1 platforms with host tools only. For other tiers, helps from target platform maintainers/experts are needed :)

Here is a list of files expected to be remapped:

* Final build proudcts being distributed to users.
  * Do we need to check every crate type respectively?
* Debuginfo files that could be distributed to users.

These files are out of scope:

* Intermediate object files **are not** under considerations
  * From Cargo's perpspective, not rustc
* Any others?

## `{x86_64,aarch64}-unknown-linux-gnu`

* final build products
* split debuginfo
  * `*.dwp`
  * `*.dwo`
* unsplit debuginfo inside binaries

## `{x86_64,aarch64}-apple-darwin`

* final build products
* split debuginfo
  * Every file inside `*.dSYM`
* unsplit debuginfo inside binaries

## `x86_64-pc-windows-msvc`

* final build products
* split debuginfo
  * PDB files
* unsplit debuginfo inside binaries


## `x86_64-pc-windows-gnu`

* final build products
* split debuginfo
  * `*.dwp`
  * `*.dwo`
* unsplit debuginfo inside binaries
