Demangled Rust identifiers under the `legacy` name mangling scheme rely
on a hash to disambiguate items with the same name, such as different
monomorphisations of the same function or different closures’
`call_once` methods.
In the `v0` mangling scheme, this is no longer a problem. However,
configuring the demangler to show hashes in `legacy` names will include
crate-id hashes in `v0` names, which are [mostly
unneeded](https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html#appendix-a---suggested-demangling).
This PR introduces a new checkbox *Options...* → *Verbose demangling*
that lets the user select if they want to include disambiguating hashes
in demangled identifiers.
This checkbox is only shown for compilers that support verbose
demangling, and deactivated when the *Demangle identifiers* checkbox is
unchecked.
Resolves#1754.
Resolves#6255.
`rustc` by default only gives a short version output like this
```console
$ rustc --version
rustc 1.75.0-nightly (42b1224e9 2023-10-15)
```
There is, however, a more verbose version info that also includes the
LLVM version used:
```console
$ rustc --version --verbose
rustc 1.75.0-nightly (42b1224e9 2023-10-15)
binary: rustc
commit-hash: 42b1224e9eb37177f608d3f6a6f2be2ee13902e4
commit-date: 2023-10-15
host: x86_64-unknown-linux-gnu
release: 1.75.0-nightly
LLVM version: 17.0.2
```
This is useful information, so it should be accessible.
---
I’d normally have used `--version --verbose`, but it seems that the
`versionFlag` property is passed as one single argument to `rustc` and
not split on spaces, so I used the short form `-vV` instead.
`rustfilt` ended up at a different path for me, and the "absolute path as compiler name" compatibility kludge seems not to work anymore.
(Also, this way it matters less where rustc is installed.)
C++ is tested. Every other language is "unsupported" right now
D works (But there are no libs yet, I'm talking with
@JohanEngelen to see which could be useful)
Haskell should work (Asked @TartanLlama if we could use some)
ispc should work
Every other language is unconfirmed. Please test if you can!
The syntaxis is similar to what's already there.
c++.amazon.properties has a working example which you can use
as a template
If you find any broken piece, please let me know.
Thank to @mattgodbolt for the testing :D
This closes#490 for now. Maybe a newer ui pretties it up