aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@FreeBSD.org>2026-07-06 16:25:48 +0000
committerJessica Clarke <jrtc27@FreeBSD.org>2026-07-06 16:25:48 +0000
commit7a0b9e30a5ba07066caffba51fa82ca3782a5da1 (patch)
treeb37137507a47f152eeb0870490c440dc330a7c72
parent58c73727d6e49de1fc4f4bc90621146cae8db2bc (diff)
libllvmminimal: Fix building with LLVM < 21 on riscv64
On most architectures we end up not needing ABIBreak.cpp as, although some of the sources here do reference EnableABIBreakingChecks (or, if assertions are disabled, DisableABIBreakingChecks) at a source level, we compile with -ffunction-sections and -fdata-sections, and link with --gc-sections, and it happens to be the case that all references can be GC'ed. However, prior to LLVM 21, the RISC-V backend did not apply -fdata-sections to .sdata, where references to these symbols end up, and for some files we're building with such references we end up not being able to GC .sdata due to the other unrelated data in it, meaning that we do in fact need to build ABIBreak.cpp. Whilst we could make this conditional on the architecture, it's a tiny file, and it's a bit fragile to rely on GC behaviour, so just include it unconditionally. Reviewed by: dim, emaste Fixes: 770cf0a5f02d ("Fixups after llvm-project main llvmorg-21-init-19288-gface93e724f4 merge") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D58044
-rw-r--r--lib/clang/libllvmminimal/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/clang/libllvmminimal/Makefile b/lib/clang/libllvmminimal/Makefile
index f54974c2d2ca..eaa6a670294d 100644
--- a/lib/clang/libllvmminimal/Makefile
+++ b/lib/clang/libllvmminimal/Makefile
@@ -6,7 +6,7 @@ INTERNALLIB=
SRCDIR= llvm/lib
SRCS+= Demangle/ItaniumDemangle.cpp
-#SRCS+= Support/ABIBreak.cpp
+SRCS+= Support/ABIBreak.cpp
SRCS+= Support/APFloat.cpp
SRCS+= Support/APInt.cpp
#SRCS+= Support/Atomic.cpp