Skip to content

Commit d33e029

Browse files
committed
Rename split-debuginfo-path to split-debuginfo-file
1 parent d790948 commit d33e029

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

text/3127-trim-paths.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ This flag accepts a comma-separated list of values and may be specified multiple
9494

9595
- `macro` - apply remappings to the expansion of `std::file!()` macro. This is where paths in embedded panic messages come from
9696
- `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
9898
- `diagnostics` - apply remappings to printed compiler diagnostics
9999

100100
## Cargo
@@ -147,11 +147,12 @@ A further `--remap-path-scope` is also supplied for options `1` and `2`:
147147

148148
If `trim-path` is `1`, then it depends on the setting of `split-debuginfo` (whether the setting is explicitly supplied or from the default)
149149
- 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+
151152
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
152153
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
153154

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`
155156

156157

157158
Some interactions with compiler-intrinsic macros need to be considered:
@@ -180,7 +181,7 @@ local path to be remapped in the usual way.
180181

181182
When debug information are not embedded in the binary (i.e. `split-debuginfo` is not `off`), absolute paths to various files containing debug
182183
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.
184185

185186
On macOS and ELF platforms, these paths are introduced by `rustc` during codegen. With MSVC, however, the path to `.pdb` fil is generated and
186187
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

Comments
 (0)