Page MenuHomeFreeBSD

Add WITH_LLVM_CXXFILT option to install llvm-cxxfilt as c++filt
ClosedPublic

Authored by dim on Nov 2 2020, 9:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 11:00 PM
Unknown Object (File)
Sun, Apr 7, 5:14 PM
Unknown Object (File)
Sun, Apr 7, 3:31 AM
Unknown Object (File)
Mar 10 2024, 9:52 PM
Unknown Object (File)
Dec 20 2023, 8:33 AM
Unknown Object (File)
Dec 11 2023, 1:28 AM
Unknown Object (File)
Nov 18 2023, 11:08 PM
Unknown Object (File)
Oct 13 2023, 5:03 AM
Subscribers

Details

Summary

Since elftoolchain's cxxfilt is rather far behind on features, and we
ran into several bugs, I think it is a good idea to use llvm-cxxfilt as
an alternative drop-in replacement.

It supports the same options as elftoolchain cxxfilt, though it doesn't
have support for old ARM (C++ Annotated Reference Manual, not the CPU)
and GNU v2 manglings. But these are irrelevant in 2020.

Note: as we already compile the required libraries as part of libllvm,
this will not add any significant build time either.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dim requested review of this revision.Nov 2 2020, 9:28 PM

Should MK_LLVM_CXXFILT be made a default since it leads to a more stable c++filt?

In D27071#604022, @yuri wrote:

Should `MK_LLVM_CXXFILT``` be made a default since it leads to a more stable c++filt?

Yes, but I'd like to do that as a two-step process: first get the option in and building correctly (I always make mistaeks ;) ), then flip the options from default off to default on, in a subsequent commit.

(Note that we can also easily MFC these changes, independently of wholesale llvm merges.)

This revision is now accepted and ready to land.Nov 2 2020, 11:19 PM

I too do not see why doing it in two stages, instead of simply switching to llvm cxxfilt.

If the concern is that there are cases where llvm cxxfilt would not work and users need to compare it to elftc cxxfilt, then the solution should be to install both, but under different names, same as grep/bsdgrep. But I do not see the point.

[if] there are cases where llvm cxxfilt would not work and users need to compare it to elftc cxxfilt

I very much doubt this would be the case - if there's a discrepancy between the two LLVM is almost certainly the correct one.

One possible argument for two stages is for MFC to make it easier to handle the (very unlike) case that someone is relying on elftc-specific functionality.