Files
sousa-gecko/taskcluster/scripts/misc/cctools-llvm-c-headers.patch
Ryan VanderMeulen 5b74429796 Bug 2071151 - Cherry-pick the upstream clang 23 fixes and fix cctools-port and winchecksec. r=firefox-build-system-reviewers,ahochheiden
llvmorg-24-init-8185-gbe215a25f001.patch and llvmorg-24-init-8187-gbc6c76a4d4f8.patch are the upstream
extract_symbols.py fixes for the clang::interp exports and the Registry<T> accessors, so
filter-symbols_clang_23.patch shrinks back to the Mozilla-specific size reductions. That also keeps it
applying to clang-trunk, which already has both fixes. llvmorg-24-init-7807-g651d01e873c6.patch cherry-picks
the upstream fix for a TypePrinter infinite recursion on FullyQualifiedName template parameters, which the
mozsearch plugin hits on UniquePtr<T[N]>.

libdispatch trips the new -Wunused-but-set-global (backport of the upstream fix the tpoechtrager fork lacks),
cctools-port's configure needs to copy LLVM 23's new llvm-c/Visibility.h and llvm-config.h next to lto.h, and
pe-parse's unused to_string template fails the /W4 /WX build whenever clang has -Wunused-template in -Wall
(23.1.0 did, 23.1.1 backed it out pending a libc++ cleanup), so keep it off explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D325225
2026-09-11 07:15:48 +00:00

21 lines
981 B
Diff

Since LLVM 23 (llvm/llvm-project commit 0e02ccdaf010), llvm-c/lto.h includes llvm-c/Visibility.h,
which in turn includes llvm/Config/llvm-config.h. The configure macro copies lto.h and ExternC.h out
of the LLVM include directory instead of adding that directory to the include path, so copy those two
headers alongside them. Upstream: https://github.com/tpoechtrager/cctools-port/pull/192
--- a/cctools/m4/llvm.m4
+++ b/cctools/m4/llvm.m4
@@ -68,6 +68,12 @@
cp -f $LLVM_INCLUDE_DIR/llvm-c/ExternC.h `dirname ${0}`/include/llvm-c
fi
+ if test -e $LLVM_INCLUDE_DIR/llvm-c/Visibility.h; then
+ cp -f $LLVM_INCLUDE_DIR/llvm-c/Visibility.h `dirname ${0}`/include/llvm-c
+ mkdir -p `dirname ${0}`/include/llvm/Config
+ cp -f $LLVM_INCLUDE_DIR/llvm/Config/llvm-config.h `dirname ${0}`/include/llvm/Config
+ fi
+
LTO_DEF=-DLTO_SUPPORT
LTO_LIB="-L${LLVM_LIB_DIR} -lLTO"