| Name |
llvm-libs |
| Description |
LLVM runtime libraries |
| Version |
21.1.8-1 |
| Package Base |
llvm |
| Homepage |
https://llvm.org/ |
| Maintainers |
['Evangelos Foutras <foutrelis@archlinux.org>', 'Leonidas Spyropoulos <artafinde@archlinux.org>'] |
| Contributors |
['Jan "heftig" Steffens <jan.steffens@gmail.com>'] |
| Distro-repo |
https://gitlab.archlinux.org/archlinux/packaging/packages/llvm |
| Sources |
['https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/cmake-21.1.8.src.tar.xz', 'https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/cmake-21.1.8.src.tar.xz.sig', 'https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/llvm-21.1.8.src.tar.xz', 'https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/llvm-21.1.8.src.tar.xz.sig', 'https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/third-party-21.1.8.src.tar.xz', 'https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/third-party-21.1.8.src.tar.xz.sig'] |
| Dependencies |
['gcc-libs', 'libedit', 'libffi', 'libxml2', 'zlib', 'zstd'] |
| Optional-Dependencies |
[] |
| Build-Dependencies |
['cmake', 'ninja', 'zlib', 'zstd', 'curl', 'libffi', 'libedit', 'libxml2', 'python-setuptools', 'python-psutil', 'python-sphinx', 'python-myst-parser', 'python-build', 'python-installer', 'python-wheel'] |
| Provides |
['libLLVM.so', 'libLTO.so', 'libRemarks.so'] |
| Builddate |
02-02-2026 13:15:20 |
| Architecture |
x86_64 |
| Distro-Version |
|
| Licenses |
['Apache-2.0 WITH LLVM-exception'] |
| Hash |
8a8d86d63f6b6e4443003537bb0c49df854d9139723547f95b9d2923f72383f9 |
# Maintainer: Evangelos Foutras <foutrelis@archlinux.org>
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=('llvm' 'llvm-libs')
pkgver=21.1.8
pkgrel=1
arch=('x86_64')
url="https://llvm.org/"
license=('Apache-2.0 WITH LLVM-exception')
makedepends=('cmake' 'ninja' 'zlib' 'zstd' 'curl' 'libffi' 'libedit' 'libxml2'
'python-setuptools' 'python-psutil' 'python-sphinx'
'python-myst-parser' 'python-build' 'python-installer' 'python-wheel')
options=('staticlibs' '!lto') # tools/llvm-shlib/typeids.test fails with LTO
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
source=($_source_base/llvm-$pkgver.src.tar.xz{,.sig}
$_source_base/cmake-$pkgver.src.tar.xz{,.sig}
$_source_base/third-party-$pkgver.src.tar.xz{,.sig})
sha256sums=('d9022ddadb40a15015f6b27e6549a7144704ded8828ba036ffe4b8165707de21'
'SKIP'
'85735f20fd8c81ecb0a09abb0c267018475420e93b65050cc5b7634eab744de9'
'SKIP'
'7fe99424384aea529ffaeec9cc9dfb8b451fd1852c03fc109e426fe208a1f1a7'
'SKIP')
validpgpkeys=('474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard <tstellar@redhat.com>
'D574BD5D1D0E98895E3BF90044F2485E45D59042' # Tobias Hieta <tobias@hieta.se>
'FFB3368980F3E6BB5737145A316C56D064CACBA5' # Douglas Yung <douglas.yung@sony.com>
'71046D1E9C6656BDD61171873E83BABF4A4F9E85' # Cullen Rhodes <cullen.rhodes@arm.com>
)
# Utilizing LLVM_DISTRIBUTION_COMPONENTS to avoid
# installing static libraries; inspired by Gentoo
_get_distribution_components() {
local target
ninja -t targets | grep -Po 'install-\K.*(?=-stripped:)' | while read -r target; do
case $target in
llvm-libraries|distribution)
continue
;;
# shared libraries
LLVM|LLVMgold)
;;
# libraries needed for clang-tblgen
LLVMDemangle|LLVMSupport|LLVMTableGen)
;;
# used by lldb
LLVMDebuginfod)
;;
# testing libraries
LLVMTestingAnnotations|LLVMTestingSupport)
;;
# exclude static libraries
LLVM*)
continue
;;
# exclude llvm-exegesis (doesn't seem useful without libpfm)
llvm-exegesis)
continue
;;
esac
echo $target
done
}
prepare() {
rename -v -- "-$pkgver.src" '' {cmake,third-party}-$pkgver.src
cd llvm-$pkgver.src
mkdir build
# Remove CMake find module for zstd; breaks if out of sync with upstream zstd
rm cmake/modules/Findzstd.cmake
}
build() {
cd llvm-$pkgver.src/build
# Build only minimal debug info to reduce size
CFLAGS=${CFLAGS/-g /-g1 }
CXXFLAGS=${CXXFLAGS/-g /-g1 }
local cmake_args=(
-G Ninja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_DOCDIR=share/doc
-DCMAKE_INSTALL_PREFIX=/usr
-DCMAKE_SKIP_RPATH=ON
-DLLVM_BINUTILS_INCDIR=/usr/include
-DLLVM_BUILD_DOCS=ON
-DLLVM_BUILD_LLVM_DYLIB=ON
-DLLVM_BUILD_TESTS=ON
-DLLVM_ENABLE_BINDINGS=OFF
-DLLVM_ENABLE_CURL=ON
-DLLVM_ENABLE_FFI=ON
-DLLVM_ENABLE_RTTI=ON
-DLLVM_ENABLE_SPHINX=ON
-DLLVM_HOST_TRIPLE=$CHOST
-DLLVM_INCLUDE_BENCHMARKS=OFF
-DLLVM_INSTALL_GTEST=ON
-DLLVM_INSTALL_UTILS=ON
-DLLVM_LINK_LLVM_DYLIB=ON
-DLLVM_USE_PERF=ON
-DSPHINX_WARNINGS_AS_ERRORS=OFF
-DPACKAGE_BUGREPORT=https://gitlab.archlinux.org/archlinux/packaging/packages/llvm/-/issues
)
cmake .. "${cmake_args[@]}"
local distribution_components=$(_get_distribution_components | paste -sd\;)
test -n "$distribution_components"
cmake_args+=(-DLLVM_DISTRIBUTION_COMPONENTS="$distribution_components")
cmake .. "${cmake_args[@]}"
ninja
# Include lit for running lit-based tests in other projects
pushd ../utils/lit
python -m build --wheel --no-isolation
popd
}
check() {
cd llvm-$pkgver.src/build
LD_LIBRARY_PATH=$PWD/lib ninja check
}
package_llvm() {
pkgdesc="Compiler infrastructure"
depends=('llvm-libs' 'curl' 'perl')
cd llvm-$pkgver.src/build
DESTDIR="$pkgdir" ninja install-distribution
# Include lit for running lit-based tests in other projects
pushd ../utils/lit
python -m installer --destdir="$pkgdir" dist/*.whl
popd
# The runtime libraries go into llvm-libs
mv -f "$pkgdir"/usr/lib/lib{LLVM,LTO,Remarks}*.so* "$srcdir"
mv -f "$pkgdir"/usr/lib/LLVMgold.so "$srcdir"
# Remove documentation sources
rm -r "$pkgdir"/usr/share/doc/llvm/html/{_sources,.buildinfo}
install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_llvm-libs() {
pkgdesc="LLVM runtime libraries"
depends=('gcc-libs' 'zlib' 'zstd' 'libffi' 'libedit' 'libxml2')
provides=('libLLVM.so' 'libLTO.so' 'libRemarks.so')
install -d "$pkgdir/usr/lib"
cp -P \
"$srcdir"/lib{LLVM,LTO,Remarks}*.so* \
"$srcdir"/LLVMgold.so \
"$pkgdir/usr/lib/"
# Symlink LLVMgold.so from /usr/lib/bfd-plugins
# https://bugs.archlinux.org/task/28479
install -d "$pkgdir/usr/lib/bfd-plugins"
ln -s ../LLVMgold.so "$pkgdir/usr/lib/bfd-plugins/LLVMgold.so"
install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et: