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
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,7 +94,7 @@ This flag accepts a comma-separated list of values and may be specified multiple
94
94
95
95
-`macro` - apply remappings to the expansion of `std::file!()` macro. This is where paths in embedded panic messages come from
96
96
-`debuginfo` - apply remappings to debug information, wherever they may be written to
97
-
-`split-debuginfo-path` - when `split-debuginfo=packed` or `unpacked`, apply remappings to the paths pointing to these split debug information files
97
+
-`split-debuginfo-file` - when `split-debuginfo=packed` or `unpacked`, apply remappings to the paths pointing to these split debug information files
98
98
-`diagnostics` - apply remappings to printed compiler diagnostics
99
99
100
100
## Cargo
@@ -147,11 +147,12 @@ A further `--remap-path-scope` is also supplied for options `1` and `2`:
147
147
148
148
If `trim-path` is `1`, then it depends on the setting of `split-debuginfo` (whether the setting is explicitly supplied or from the default)
149
149
- If `split-debuginfo` is `off`, then `--remap-path-scope=macro,debuginfo`.
150
-
- If `split-debuginfo` is `packed` or `unpacked`, then `--remap-path-scope=macro,split-debuginfo-path`
150
+
- If `split-debuginfo` is `packed` or `unpacked`, then `--remap-path-scope=macro,split-debuginfo-file`
151
+
151
152
This is because we always want to remap panic messages as they will always be embedded in executable/library. We need to sanitise debug information
152
153
if they are embedded, but don't need to touch them if they are split. However in case they are split we need to sanitise the paths to these split files
153
154
154
-
If `trim-path` is `2` (`true`), all paths will be affected, equivalent to `--remap-path-scope=macro,debuginfo,diagnostics,split-debuginfo-path`
155
+
If `trim-path` is `2` (`true`), all paths will be affected, equivalent to `--remap-path-scope=macro,debuginfo,diagnostics,split-debuginfo-file`
155
156
156
157
157
158
Some interactions with compiler-intrinsic macros need to be considered:
@@ -180,7 +181,7 @@ local path to be remapped in the usual way.
180
181
181
182
When debug information are not embedded in the binary (i.e. `split-debuginfo` is not `off`), absolute paths to various files containing debug
182
183
information are embedded into the binary instead. Such as the absolute path to `.pdb` file (MSVC, `packed`), `.dwo` files (ELF, `unpacked`),
183
-
and `.o` files (ELF, `packed`). This can be undesirable. As such, `split-debuginfo-path` is made specifically for these embedded paths.
184
+
and `.o` files (ELF, `packed`). This can be undesirable. As such, `split-debuginfo-file` is made specifically for these embedded paths.
184
185
185
186
On macOS and ELF platforms, these paths are introduced by `rustc` during codegen. With MSVC, however, the path to `.pdb` fil is generated and
186
187
embedded into the binary by the linker `link.exe`. The linker has a `/PDBALTPATH` option allows us to change the embedded path written to the
0 commit comments