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
Rollup merge of rust-lang#125880 - Zalathar:demangler, r=oli-obk
Remove `src/tools/rust-demangler`
`rust-demangler` is a small binary that reads a list of mangled symbols from stdin, demangles them (using the `rustc-demangle` library crate), and prints the demangled symbols to stdout.
It was added as part of the initial implementation of coverage instrumentation in 2020/2021, so that coverage tests could pass it to `llvm-cov --Xdemangler` when generating coverage reports. It has been largely untouched since then.
As of rust-lang#125816 it is no longer used by coverage tests, and has no remaining in-tree uses.
There is code in bootstrap to build and package the demangler, but it's unclear where the resulting binaries actually end up, or whether there's any reasonable way for `rustup` users to obtain them.
---
For users needing a command-line demangler, `rustfilt` exists and is more actively maintained. It's also quite easy to use the `rustc-demangle` library to build a custom command-line demangler if necessary, with only a few lines of code.
The tool's name (`rust-demangler`) is easily confused with the name of the library crate `rustc-demangle`, so removing the tool will eliminate that confusion. There also doesn't appear to be much reason to use `rust-demangler` over `rustfilt`.
---
This PR therefore removes the tool, and removes all of its associated code from bootstrap.
MCP filed: rust-lang/compiler-team#754
Copy file name to clipboardexpand all lines: src/doc/rustc/src/instrument-coverage.md
+1-7
Original file line number
Diff line number
Diff line change
@@ -49,12 +49,6 @@ One option for a Rust demangler is [`rustfilt`], which can be installed with:
49
49
cargo install rustfilt
50
50
```
51
51
52
-
Another option, if you are building from the Rust compiler source distribution, is to use the `rust-demangler` tool included in the Rust source distribution, which can be built with:
@@ -164,7 +158,7 @@ $ llvm-cov show -Xdemangler=rustfilt target/debug/examples/formatjson5 \
164
158
165
159
Some of the more notable options in this example include:
166
160
167
-
-`--Xdemangler=rustfilt` - the command name or path used to demangle Rust symbols (`rustfilt` in the example, but this could also be a path to the `rust-demangler` tool)
161
+
-`--Xdemangler=rustfilt` - the command name or path used to demangle Rust symbols (`rustfilt` in the example)
168
162
-`target/debug/examples/formatjson5` - the instrumented binary (from which to extract the coverage map)
169
163
-`--instr-profile=<path-to-file>.profdata` - the location of the `.profdata` file created by `llvm-profdata merge` (from the `.profraw` file generated by the instrumented binary)
170
164
-`--name=<exact-function-name>` - to show coverage for a specific function (or, consider using another filter option, such as `--name-regex=<pattern>`)
0 commit comments