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
Copy file name to clipboardExpand all lines: text/3127-trim-paths.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ This flag accepts a comma-separated list of values and may be specified multiple
98
98
-`split-debuginfo` - apply remappings to debug information only when they are written to split debug information files, but not in compiled executables or libraries
99
99
-`split-debuginfo-file` - apply remappings to the paths pointing to split debug information files. Does nothing when these files are not generated.
100
100
-`object` - an alias for `macro,unsplit-debuginfo,split-debuginfo-file`. This ensures all paths in compiled executables or libraries are remapped, but not elsewhere.
101
-
-`all` and `true` - an alias for all of the above, also equivalent to supplying `--remap-path-prefix` without this option.
101
+
-`all` and `true` - an alias for all of the above, also equivalent to supplying only `--remap-path-prefix` without `--remap-path-scope`.
102
102
103
103
Debug information are written to split files when the separate codegen option `-C split-debuginfo=packed` or `unpacked` (whether by default or explicitly set).
104
104
@@ -119,7 +119,7 @@ The default release profile setting (`object`) sanitises only the paths in emitt
119
119
only if they will be embedded together with the binary (the default on platforms with ELF binaries, such as Linux and windows-gnu),
120
120
but will not touch them if they are in separate files (the default on Windows MSVC and macOS). But the path to these separate files are sanitised.
121
121
122
-
The following paths are sanitised, if they appear in a covered scope:
122
+
If `trim-paths` is not `none` or `false`, then the following paths are sanitised if they appear in a selected scope:
123
123
124
124
1. Path to the source files of the standard and core library (sysroot) will begin with `/rustc/[rustc commit hash]`.
125
125
E.g. `/home/username/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs` ->
@@ -128,7 +128,7 @@ The following paths are sanitised, if they appear in a covered scope:
128
128
3. Path to packages outside of the working directory will be replaced with `[package name]-[version]`. E.g. `/home/username/deps/foo/src/lib.rs` -> `foo-0.1.0/src/lib.rs`
129
129
130
130
When a path to the source files of the standard and core library is *not* in scope for sanitisation, the emitted path will depend on if `rust-src` component
131
-
is present. If it is, then the real path pointing to a copy of the source files on your file system will be emitted; if it isn't, then they will
131
+
is present. If it is, then the real path pointing to the copy of the source files on your file system will be emitted; if it isn't, then they will
132
132
show up as `/rustc/[rustc commit hash]/library/...` (just like when it is selected for sanitisation). Paths to all other source files will not be affected.
133
133
134
134
This will not affect any hard-coded paths in the source code, such as in strings.
0 commit comments