From a36cf643989df6c8c379130988c5f32da4cd4b1c Mon Sep 17 00:00:00 2001 From: Raven Date: Sat, 15 Mar 2025 12:58:43 +0600 Subject: [PATCH] llvm: 20.1.0 --- modular/llvm/llvm.spec | 49 +++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/modular/llvm/llvm.spec b/modular/llvm/llvm.spec index 8f0e2a9..1fd5bda 100644 --- a/modular/llvm/llvm.spec +++ b/modular/llvm/llvm.spec @@ -1,8 +1,8 @@ #region globals #region version -%global maj_ver 19 +%global maj_ver 20 %global min_ver 1 -%global patch_ver 7 +%global patch_ver 0 #global rc_ver 4 %bcond_with snapshot_build @@ -28,8 +28,8 @@ %bcond_with check %if %{with bundle_compat_lib} -%global compat_maj_ver 18 -%global compat_ver %{compat_maj_ver}.1.8 +%global compat_maj_ver 19 +%global compat_ver %{compat_maj_ver}.1.7 %endif # Compat builds do not include python-lit and lldb @@ -392,6 +392,7 @@ BuildRequires: perl(Sys::Hostname) BuildRequires: python%{python3_pkgversion}-numpy BuildRequires: python%{python3_pkgversion}-pybind11 BuildRequires: python%{python3_pkgversion}-pyyaml +BuildRequires: python%{python3_pkgversion}-nanobind-devel %endif BuildRequires: graphviz @@ -407,6 +408,8 @@ BuildRequires: /usr/bin/marshalparser %global py_reproducible_pyc_path %{buildroot}%{python3_sitelib} %endif +BuildConflicts: lua-devel + Requires: %{pkg_name_llvm}-libs%{?_isa} = %{version}-%{release} Provides: llvm(major) = %{maj_ver} @@ -579,6 +582,8 @@ Requires: %{pkg_name_clang}-libs = %{version}-%{release} Requires: %{pkg_name_clang}%{?_isa} = %{version}-%{release} # The clang CMake files reference tools from clang-tools-extra. Requires: %{pkg_name_clang}-tools-extra%{?_isa} = %{version}-%{release} +# The clang cmake package depends on the LLVM cmake package. +Requires: %{pkg_name_llvm}-devel%{?_isa} = %{version}-%{release} Provides: clang-devel(major) = %{maj_ver} # For the clangd language server contained in this subpackage, # add a Provides so users can just run "dnf install clangd." @@ -708,8 +713,8 @@ URL: http://openmp.llvm.org %package -n %{pkg_name_lld} Summary: The LLVM Linker -Requires(post): %{_sbindir}/update-alternatives -Requires(preun): %{_sbindir}/update-alternatives +Requires(post): alternatives +Requires(preun): alternatives Requires: %{pkg_name_lld}-libs = %{version}-%{release} Provides: lld(major) = %{maj_ver} @@ -1175,6 +1180,13 @@ fi # This is to fix occasional OOM errors on the ppc64le COPR builders. %cmake_build --target libclang-cpp.so +# Same for the three large MLIR dylibs. +%if %{with mlir} +%cmake_build --target libMLIR.so +%cmake_build --target libMLIR-C.so +%cmake_build --target libMLIRPythonCAPI.so +%endif + %cmake_build # If we don't build the runtimes target here, we'll have to wait for the %%check @@ -1713,6 +1725,7 @@ test_list_filter_out+=("libomp :: affinity/kmp-abs-hw-subset.c") test_list_filter_out+=("libomp :: parallel/bug63197.c") test_list_filter_out+=("libomp :: tasking/issue-69733.c") test_list_filter_out+=("libarcher :: races/task-taskgroup-unrelated.c") +test_list_filter_out+=("libarcher :: races/task-taskwait-nested.c") # These tests fail more often than not, but not always. test_list_filter_out+=("libomp :: worksharing/for/omp_collapse_many_GELTGT_int.c") @@ -1771,7 +1784,6 @@ export LIT_XFAIL="$LIT_XFAIL;races/lock-unrelated.c" export LIT_XFAIL="$LIT_XFAIL;races/parallel-simple.c" export LIT_XFAIL="$LIT_XFAIL;races/task-dependency.c" export LIT_XFAIL="$LIT_XFAIL;races/task-taskgroup-unrelated.c" -export LIT_XFAIL="$LIT_XFAIL;races/task-taskwait-nested.c" export LIT_XFAIL="$LIT_XFAIL;races/task-two.c" export LIT_XFAIL="$LIT_XFAIL;races/taskwait-depend.c" export LIT_XFAIL="$LIT_XFAIL;reduction/parallel-reduction-nowait.c" @@ -1902,9 +1914,9 @@ cp %{_vpath_builddir}/.ninja_log %{buildroot}%{pkg_datadir} %endif %post -n %{pkg_name_llvm}-devel -%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} +update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} %if %{without compat_build} -%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} +update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} # During the upgrade from LLVM 16 (F38) to LLVM 17 (F39), we found out the # main llvm-devel package was leaving entries in the alternatives system. @@ -1912,14 +1924,14 @@ cp %{_vpath_builddir}/.ninja_log %{buildroot}%{pkg_datadir} for v in 14 15 16; do if [[ -e %{_bindir}/llvm-config-$v && "x$(%{_bindir}/llvm-config-$v --version | awk -F . '{ print $1 }')" != "x$v" ]]; then - %{_sbindir}/update-alternatives --remove llvm-config-$v %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} + update-alternatives --remove llvm-config-$v %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} fi done %endif %postun -n %{pkg_name_llvm}-devel if [ $1 -eq 0 ]; then - %{_sbindir}/update-alternatives --remove llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} + update-alternatives --remove llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} fi %if %{without compat_build} # When upgrading between minor versions (i.e. from x.y.1 to x.y.2), we must @@ -1929,17 +1941,17 @@ fi # compat package. if [[ $1 -eq 0 || "x$(%{_bindir}/llvm-config%{exec_suffix} --version | awk -F . '{ print $1 }')" != "x%{maj_ver}" ]]; then - %{_sbindir}/update-alternatives --remove llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} + update-alternatives --remove llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} fi %endif %if %{without compat_build} %post -n %{pkg_name_lld} -%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 +update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 %postun -n %{pkg_name_lld} if [ $1 -eq 0 ] ; then - %{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld + update-alternatives --remove ld %{_bindir}/ld.lld fi %endif #endregion misc @@ -2567,8 +2579,8 @@ fi # libomptarget is not supported on 32-bit systems. # s390x does not support the offloading plugins. %{install_libdir}/libomptarget.devicertl.a -%{install_libdir}/libomptarget-amdgpu-*.bc -%{install_libdir}/libomptarget-nvptx-*.bc +%{install_libdir}/libomptarget-amdgpu*.bc +%{install_libdir}/libomptarget-nvptx*.bc %{install_libdir}/libomptarget.so %if %{maj_ver} >= 20 %{install_libdir}/libLLVMOffload.so @@ -2668,7 +2680,7 @@ fi %files -n %{pkg_name_mlir}-devel %{_bindir}/mlir-cat -%{_bindir}/mlir-cpu-runner +%{_bindir}/mlir-runner %{_bindir}/mlir-linalg-ods-yaml-gen %{_bindir}/mlir-lsp-server %{_bindir}/mlir-minimal-opt @@ -2705,6 +2717,9 @@ fi #region changelog %changelog +* Mon Mar 10 2025 Raven - 20.1.0-1 +- Update to LLVM 20.1.0 + * Wed Jan 15 2025 Raven - 19.1.7-1 - Update to LLVM 19.1.7