build: Retire LLVM_CXXFILT option

The LLVM_CXXFILT option was added when we used ELF Tool Chain tools by
default.  ELF Tool Chain's c++filt failed to demangle some symbols, so
we added a special case to install LLVM's version and enabled it by
default.

The rest of the LLVM tools are now used by default, as of commit
9fa94e1c09 ("Turn on WITH_LLVM_CXXFILT by default").  Simplify the
build logic by removing a special case and just include llvm-cxxfilt
with the rest of the LLVM utilities.

Reviewed by:	dim
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55654
This commit is contained in:
Ed Maste
2026-03-04 14:03:42 -05:00
parent f68ebebd8a
commit 5d757312ad
8 changed files with 4 additions and 27 deletions
+1 -5
View File
@@ -1,5 +1,5 @@
.\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
.Dd March 3, 2026
.Dd March 5, 2026
.Dt SRC.CONF 5
.Os
.Sh NAME
@@ -122,8 +122,6 @@ When set, it enforces these options:
.Bl -item -compact
.It
.Va WITH_LLVM_BINUTILS
.It
.Va WITH_LLVM_CXXFILT
.El
.It Va WITHOUT_ASSERT_DEBUG
Compile programs and libraries without the
@@ -995,8 +993,6 @@ is always provided by ELF Tool Chain.
Do not build the
.Xr llvm-cov 1
tool.
.It Va WITHOUT_LLVM_CXXFILT
Install ELF Tool Chain's cxxfilt as c++filt, instead of LLVM's llvm-cxxfilt.
.It Va WITH_LLVM_FULL_DEBUGINFO
Generate full debug information for LLVM libraries and tools, which uses
more disk space and build resources, but allows for easier debugging.
-7
View File
@@ -125,7 +125,6 @@ __DEFAULT_YES_OPTIONS = \
LLVM_ASSERTIONS \
LLVM_BINUTILS \
LLVM_COV \
LLVM_CXXFILT \
LOADER_BIOS_TEXTONLY \
LOADER_GELI \
LOADER_KBOOT \
@@ -508,12 +507,6 @@ MK_LLVM_COV:= no
MK_LLVM_BINUTILS:= yes
.endif
.if ${MK_LLVM_BINUTILS} == "yes"
# MK_LLVM_CXXFILT is a subset of MK_LLVM_BINUTILS and should therefore be
# enabled if MK_LLVM_BINUTILS is set.
MK_LLVM_CXXFILT:= yes
.endif
.if ${MK_LOADER_VERIEXEC} == "no"
MK_LOADER_VERIEXEC_PASS_MANIFEST := no
.endif
+2 -5
View File
@@ -896,6 +896,7 @@ OLD_LIBS+=usr/lib/libprivatellvm.so.19
.if ${MK_CLANG} == no && ${MK_LLVM_BINUTILS} == no
OLD_FILES+=usr/bin/llvm-addr2line
OLD_FILES+=usr/bin/llvm-ar
OLD_FILES+=usr/bin/llvm-cxxfilt
OLD_FILES+=usr/bin/llvm-nm
OLD_FILES+=usr/bin/llvm-objcopy
OLD_FILES+=usr/bin/llvm-objdump
@@ -908,6 +909,7 @@ OLD_FILES+=usr/bin/llvm-symbolizer
OLD_FILES+=usr/bin/objdump
OLD_FILES+=usr/share/man/man1/llvm-addr2line.1.gz
OLD_FILES+=usr/share/man/man1/llvm-ar.1.gz
OLD_FILES+=usr/share/man/man1/llvm-cxxfilt.1.gz
OLD_FILES+=usr/share/man/man1/llvm-nm.1.gz
OLD_FILES+=usr/share/man/man1/llvm-objcopy.1.gz
OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz
@@ -1388,11 +1390,6 @@ OLD_FILES+=usr/share/man/man1/opt.1.gz
OLD_FILES+=usr/bin/clang-format
.endif
.if ${MK_CLANG_EXTRAS} == no && ${MK_LLVM_CXXFILT} == no
OLD_FILES+=usr/bin/llvm-cxxfilt
OLD_FILES+=usr/share/man/man1/llvm-cxxfilt.1.gz
.endif
.if ${MK_CPP} == no
OLD_FILES+=usr/bin/cpp
OLD_FILES+=usr/share/man/man1/cpp.1.gz
-1
View File
@@ -1 +0,0 @@
Install ELF Tool Chain's cxxfilt as c++filt, instead of LLVM's llvm-cxxfilt.
-1
View File
@@ -1 +0,0 @@
Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt.
-2
View File
@@ -255,9 +255,7 @@ SUBDIR.${MK_TOOLCHAIN}+= size
SUBDIR.${MK_TOOLCHAIN}+= c89
SUBDIR.${MK_TOOLCHAIN}+= c99
SUBDIR.${MK_TOOLCHAIN}+= ctags
.if ${MK_LLVM_CXXFILT} == "no"
SUBDIR.${MK_TOOLCHAIN}+= cxxfilt
.endif
# ELF Tool Chain elfcopy required for EFI objects (PR280771)
SUBDIR.${MK_TOOLCHAIN}+= elfcopy
SUBDIR.${MK_TOOLCHAIN}+= file2c
+1 -4
View File
@@ -14,6 +14,7 @@ SUBDIR+= clang-scan-deps
# as the default binutils (ar,nm,addr2line, etc.).
.if ${MK_CLANG} != "no" || ${MK_LLVM_BINUTILS} != "no"
SUBDIR+= llvm-ar
SUBDIR+= llvm-cxxfilt
SUBDIR+= llvm-nm
SUBDIR+= llvm-objcopy
SUBDIR+= llvm-objdump
@@ -23,10 +24,6 @@ SUBDIR+= llvm-strings
SUBDIR+= llvm-symbolizer
.endif
.if ${MK_LLVM_BINUTILS} != "no" || ${MK_LLVM_CXXFILT} != "no"
SUBDIR+= llvm-cxxfilt
.endif
.if ${MK_CLANG_EXTRAS} != "no"
SUBDIR+= bugpoint
SUBDIR+= llc
-2
View File
@@ -22,9 +22,7 @@ DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}
.if ${MK_LLVM_CXXFILT} != "no"
LINKS= ${BINDIR}/llvm-cxxfilt ${BINDIR}/c++filt
MLINKS= llvm-cxxfilt.1 c++filt.1
.endif
.include "../llvm.prog.mk"