git: 5d757312ad59 - main - build: Retire LLVM_CXXFILT option
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 05 Mar 2026 14:43:54 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=5d757312ad591aae26b39943f113ebf3819718da
commit 5d757312ad591aae26b39943f113ebf3819718da
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-03-04 19:03:42 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-03-05 14:43:46 +0000
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
9fa94e1c099d ("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
---
share/man/man5/src.conf.5 | 6 +-----
share/mk/src.opts.mk | 7 -------
tools/build/mk/OptionalObsoleteFiles.inc | 7 ++-----
tools/build/options/WITHOUT_LLVM_CXXFILT | 1 -
tools/build/options/WITH_LLVM_CXXFILT | 1 -
usr.bin/Makefile | 2 --
usr.bin/clang/Makefile | 5 +----
usr.bin/clang/llvm-cxxfilt/Makefile | 2 --
8 files changed, 4 insertions(+), 27 deletions(-)
diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5
index 01e9db1f1915..71d8af3057d5 100644
--- a/share/man/man5/src.conf.5
+++ b/share/man/man5/src.conf.5
@@ -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.
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
index 4abe1c699b4e..fa91c537188d 100644
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -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
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index c915da8ca501..fd25359c7c0b 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -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
diff --git a/tools/build/options/WITHOUT_LLVM_CXXFILT b/tools/build/options/WITHOUT_LLVM_CXXFILT
deleted file mode 100644
index e7d263f01f2a..000000000000
--- a/tools/build/options/WITHOUT_LLVM_CXXFILT
+++ /dev/null
@@ -1 +0,0 @@
-Install ELF Tool Chain's cxxfilt as c++filt, instead of LLVM's llvm-cxxfilt.
diff --git a/tools/build/options/WITH_LLVM_CXXFILT b/tools/build/options/WITH_LLVM_CXXFILT
deleted file mode 100644
index f6ac38b20af7..000000000000
--- a/tools/build/options/WITH_LLVM_CXXFILT
+++ /dev/null
@@ -1 +0,0 @@
-Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt.
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index 0c9c66748269..125ecb6f05a0 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -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
diff --git a/usr.bin/clang/Makefile b/usr.bin/clang/Makefile
index e2debfb8c582..ac92b08a54cb 100644
--- a/usr.bin/clang/Makefile
+++ b/usr.bin/clang/Makefile
@@ -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
diff --git a/usr.bin/clang/llvm-cxxfilt/Makefile b/usr.bin/clang/llvm-cxxfilt/Makefile
index f9621da8da89..98cc5c09f4c4 100644
--- a/usr.bin/clang/llvm-cxxfilt/Makefile
+++ b/usr.bin/clang/llvm-cxxfilt/Makefile
@@ -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"