# spec file for llvm19-bootstrap # # This spec file is for building a minimal, bootstrapped version of LLVM 19. # It includes only clang and lld, as a prerequisite for building the full # LLVM package using the Fedora upstream spec. Name: llvm19-bootstrap Version: 19.1.7 Release: 1%{?dist} Summary: The LLVM Compiler Infrastructure, minimal namespaced bootstrap version License: Apache-2.0 AND NCSA URL: https://llvm.org/ Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.7/llvm-project-19.1.7.src.tar.xz Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.7/llvm-project-19.1.7.src.tar.xz.sig BuildRequires: cmake BuildRequires: ninja-build BuildRequires: zlib-devel BuildRequires: libxml2-devel BuildRequires: python3-devel BuildRequires: openssl-devel BuildRequires: gmp-devel BuildRequires: libtool BuildRequires: binutils-devel # We explicitly list the llvm18 packages as a build dependency. BuildRequires: clang18 BuildRequires: lld18 BuildRequires: llvm18 BuildRequires: compiler-rt18 Requires: zlib Requires: libxml2 %description This package contains a minimal, bootstrapped build of the LLVM 19 compiler infrastructure, including the namespaced clang C/C++ compiler and the lld linker. It is intended to be used as a build dependency for a full-featured LLVM 19 package. %prep %autosetup -n llvm-project-19.1.7.src # Verify the integrity of the source tarball using the provided SHA512 hash echo "c7d63286d662707a9cd54758c9e3aaf52794a91900c484c4a6efa62d90bc719d5e7a345e4192feeb0c9fd11c82570d64677c781e5be1d645556b6aa018e47ec8 %{_sourcedir}/llvm-project-19.1.7.src.tar.xz" | sha512sum -c - %build # We're building with a namespaced install prefix to avoid conflicts. # The binaries will be installed to /usr/bin with a version suffix. # Corrected the source directory for CMake to 'llvm'. %cmake -S llvm -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DLLVM_ENABLE_PROJECTS="clang;lld" \ -DLLVM_BUILD_TESTS=OFF \ -DLLVM_BUILD_DOCS=OFF \ -DLLVM_TOOL_LLD_BUILD=ON \ -DLLVM_TOOL_CLANG_BUILD=ON \ -DLLVM_INSTALL_BINDIR=%{_bindir} \ -DCMAKE_C_COMPILER=clang-18 \ -DCMAKE_CXX_COMPILER=clang++-18 %cmake_build %install %cmake_install # Now we rename the binaries to include the version suffix, matching the user's setup. mv %{buildroot}%{_bindir}/clang %{buildroot}%{_bindir}/clang-19 ln -sf clang-19 %{buildroot}%{_bindir}/clang++-19 mv %{buildroot}%{_bindir}/lld %{buildroot}%{_bindir}/lld-19 ln -sf lld-19 %{buildroot}%{_bindir}/ld.lld-19 %files %license llvm-project-19.1.7.src/LICENSE.TXT %{_bindir}/clang-19 %{_bindir}/clang++-19 %{_bindir}/lld-19 %{_bindir}/ld.lld-19 %{_libdir}/libLLVM*.so %{_libdir}/cmake/llvm %{_includedir}/clang %changelog * Thu Aug 07 2025 Yonghang Wang - 19.1.7-1 - Initial bootstrap package for LLVM 19, namespaced.