Use llvm-cmake-utils package

This commit is contained in:
Nikita Popov 2023-06-15 14:22:25 +02:00
parent ec9fa021a9
commit 7c3f9440e3
2 changed files with 9 additions and 34 deletions

View File

@ -1,30 +0,0 @@
From 2a0175c88ccd8c162901ac0ade56859d2b599f38 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov@redhat.com>
Date: Mon, 17 Apr 2023 16:19:04 +0200
Subject: [PATCH] Change LLVM_COMMON_CMAKE_UTILS usage
Let LLVM_COMMON_CMAKE_UTILS store the directory where cmake modules are
available and stop assuming its directory structure.
---
clang/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 1fff005d6525..f4b3ef4bd15a 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.13.4)
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
- set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
+ set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Modules)
endif()
-include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
+include(${LLVM_COMMON_CMAKE_UTILS}/CMakePolicy.cmake
NO_POLICY_SCOPE)
# If we are not building as a part of LLVM, build Clang as an
--
2.39.2

View File

@ -21,6 +21,7 @@
%global install_bindir %{install_prefix}/bin %global install_bindir %{install_prefix}/bin
%global install_includedir %{install_prefix}/include %global install_includedir %{install_prefix}/include
%global install_libdir %{install_prefix}/lib %global install_libdir %{install_prefix}/lib
%global install_datadir %{install_prefix}/share
%global pkg_bindir %{install_bindir} %global pkg_bindir %{install_bindir}
%global pkg_includedir %{install_includedir} %global pkg_includedir %{install_includedir}
@ -28,6 +29,7 @@
%else %else
%global pkg_name clang %global pkg_name clang
%global install_prefix /usr %global install_prefix /usr
%global install_datadir %{_datadir}
%global pkg_libdir %{_libdir} %global pkg_libdir %{_libdir}
%endif %endif
@ -41,7 +43,7 @@
Name: %pkg_name Name: %pkg_name
Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}
Release: 2%{?dist} Release: 3%{?dist}
Summary: A C language family front-end for LLVM Summary: A C language family front-end for LLVM
License: Apache-2.0 WITH LLVM-exception OR NCSA License: Apache-2.0 WITH LLVM-exception OR NCSA
@ -73,8 +75,6 @@ Patch8: D138472.diff
Patch10: fix-ieee128-cross.diff Patch10: fix-ieee128-cross.diff
Patch11: 0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch
# RHEL specific patches # RHEL specific patches
# Avoid unwanted dependency on python-recommonmark # Avoid unwanted dependency on python-recommonmark
Patch101: 0009-disable-recommonmark.patch Patch101: 0009-disable-recommonmark.patch
@ -91,8 +91,10 @@ BuildRequires: ninja-build
%if %{with compat_build} %if %{with compat_build}
BuildRequires: llvm%{maj_ver}-devel = %{version} BuildRequires: llvm%{maj_ver}-devel = %{version}
BuildRequires: llvm%{maj_ver}-static = %{version} BuildRequires: llvm%{maj_ver}-static = %{version}
BuildRequires: llvm%{maj_ver}-cmake-utils = %{version}
%else %else
BuildRequires: llvm-devel = %{version} BuildRequires: llvm-devel = %{version}
BuildRequires: llvm-cmake-utils = %{version}
BuildRequires: llvm-test = %{version} BuildRequires: llvm-test = %{version}
# llvm-static is required, because clang-tablegen needs libLLVMTableGen, which # llvm-static is required, because clang-tablegen needs libLLVMTableGen, which
# is not included in libLLVM.so. # is not included in libLLVM.so.
@ -363,7 +365,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py
%else %else
-DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \ -DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \
%endif %endif
-DLLVM_COMMON_CMAKE_UTILS=%{_libdir}/cmake/llvm \ -DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \
-DCLANG_ENABLE_ARCMT:BOOL=ON \ -DCLANG_ENABLE_ARCMT:BOOL=ON \
-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \ -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
-DCLANG_INCLUDE_DOCS:BOOL=ON \ -DCLANG_INCLUDE_DOCS:BOOL=ON \
@ -608,6 +610,9 @@ false
%endif %endif
%changelog %changelog
* Thu Jun 15 2023 Nikita Popov <npopov@redhat.com> - 16.0.5-3
- Use llvm-cmake-utils package
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 16.0.5-2 * Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 16.0.5-2
- Rebuilt for Python 3.12 - Rebuilt for Python 3.12