diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-11-03 19:57:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-11-03 19:57:28 +0000 |
commit | 07bab4417d0e08bed86f48dea6d0c68f496b456c (patch) | |
tree | 24f6aeede26ca29549731ad571dcd3be0abfb91b /usr.bin | |
parent | 9e47480e94c86fef6f50bf40dde4db766eeeddee (diff) | |
download | src-test-07bab4417d0e08bed86f48dea6d0c68f496b456c.tar.gz src-test-07bab4417d0e08bed86f48dea6d0c68f496b456c.zip |
Add WITH_LLVM_CXXFILT option to install llvm-cxxfilt as c++filt
Since elftoolchain's cxxfilt is rather far behind on features, and we
ran into several bugs, add an option to use llvm-cxxfilt as an 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.
PR: 250702
Reviewed by: emaste, yuri
Differential Revision: https://reviews.freebsd.org/D27071
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=367304
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/clang/Makefile | 5 | ||||
-rw-r--r-- | usr.bin/clang/llvm-cxxfilt/Makefile | 7 |
3 files changed, 13 insertions, 1 deletions
diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 85ffce06e4968..8ea3b1c2bfe3a 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -260,7 +260,9 @@ SUBDIR.${MK_TOOLCHAIN}+= ar SUBDIR.${MK_TOOLCHAIN}+= c89 SUBDIR.${MK_TOOLCHAIN}+= c99 SUBDIR.${MK_TOOLCHAIN}+= ctags +.if ${MK_LLVM_CXXFILT} == "no" SUBDIR.${MK_TOOLCHAIN}+= cxxfilt +.endif SUBDIR.${MK_TOOLCHAIN}+= objcopy SUBDIR.${MK_TOOLCHAIN}+= file2c SUBDIR.${MK_TOOLCHAIN}+= gprof diff --git a/usr.bin/clang/Makefile b/usr.bin/clang/Makefile index 68b3c1537d900..6f5a065b9ae72 100644 --- a/usr.bin/clang/Makefile +++ b/usr.bin/clang/Makefile @@ -16,6 +16,10 @@ SUBDIR+= llvm-nm SUBDIR+= llvm-objdump SUBDIR+= llvm-symbolizer +.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLVM_CXXFILT} != "no" +SUBDIR+= llvm-cxxfilt +.endif + .if ${MK_CLANG_EXTRAS} != "no" SUBDIR+= bugpoint SUBDIR+= llc @@ -23,7 +27,6 @@ SUBDIR+= lli SUBDIR+= llvm-as SUBDIR+= llvm-bcanalyzer SUBDIR+= llvm-cxxdump -SUBDIR+= llvm-cxxfilt SUBDIR+= llvm-diff SUBDIR+= llvm-dis SUBDIR+= llvm-dwarfdump diff --git a/usr.bin/clang/llvm-cxxfilt/Makefile b/usr.bin/clang/llvm-cxxfilt/Makefile index b5aa8b34b8e29..3b452a1f8e123 100644 --- a/usr.bin/clang/llvm-cxxfilt/Makefile +++ b/usr.bin/clang/llvm-cxxfilt/Makefile @@ -1,8 +1,15 @@ # $FreeBSD$ +.include <src.opts.mk> + PROG_CXX= llvm-cxxfilt SRCDIR= llvm/tools/llvm-cxxfilt SRCS+= llvm-cxxfilt.cpp +.if ${MK_LLVM_CXXFILT} != "no" +LINKS= ${BINDIR}/llvm-cxxfilt ${BINDIR}/c++filt +MLINKS= llvm-cxxfilt.1 c++filt.1 +.endif + .include "../llvm.prog.mk" |