Update to LLVM 16.0.1

Resolves: #2178739
This commit is contained in:
Nikita Popov 2023-04-19 10:29:26 +02:00
parent 5e8c2083d6
commit d2dbf70a14
5 changed files with 64 additions and 148 deletions

94
.gitignore vendored
View File

@ -1,91 +1,3 @@
/lld-4.0.0.src.tar.xz
/lld-4.0.1.src.tar.xz
/lld-5.0.0.src.tar.xz
/lld-5.0.1.src.tar.xz
/lld-6.0.0rc1.src.tar.xz
/lld-6.0.0rc2.src.tar.xz
/lld-6.0.0.src.tar.xz
/lld-6.0.1rc1.src.tar.xz
/lld-6.0.1.src.tar.xz
/lld-7.0.0rc1.src.tar.xz
/lld-7.0.0rc2.src.tar.xz
/lld-7.0.0rc3.src.tar.xz
/lld-7.0.0.src.tar.xz
/lld-7.0.1.src.tar.xz
/lld-8.0.0rc1.src.tar.xz
/lld-8.0.0rc2.src.tar.xz
/lld-8.0.0rc3.src.tar.xz
/lld-8.0.0rc4.src.tar.xz
/lld-8.0.0.src.tar.xz
/lld-9.0.0rc2.src.tar.xz
/lld-9.0.0rc3.src.tar.xz
/lld-9.0.0.src.tar.xz
/lld-9.0.0.src.tar.xz.sig
/lld-9.0.1.src.tar.xz
/lld-9.0.1.src.tar.xz.sig
/lld-10.0.0rc1.src.tar.xz
/lld-10.0.0rc1.src.tar.xz.sig
/lld-10.0.0rc2.src.tar.xz
/lld-10.0.0rc2.src.tar.xz.sig
/lld-10.0.0rc3.src.tar.xz
/lld-10.0.0rc3.src.tar.xz.sig
/lld-10.0.0rc4.src.tar.xz
/lld-10.0.0rc4.src.tar.xz.sig
/lld-10.0.0rc5.src.tar.xz
/lld-10.0.0rc5.src.tar.xz.sig
/lld-10.0.0rc6.src.tar.xz
/lld-10.0.0rc6.src.tar.xz.sig
/lld-10.0.0.src.tar.xz
/lld-10.0.0.src.tar.xz.sig
/lld-11.0.0rc1.src.tar.xz
/lld-11.0.0rc1.src.tar.xz.sig
/lld-11.0.0rc2.src.tar.xz
/lld-11.0.0rc2.src.tar.xz.sig
/lld-11.0.0rc3.src.tar.xz
/lld-11.0.0rc3.src.tar.xz.sig
/lld-11.0.0rc5.src.tar.xz
/lld-11.0.0rc5.src.tar.xz.sig
/lld-11.0.0rc6.src.tar.xz
/lld-11.0.0rc6.src.tar.xz.sig
/lld-11.0.0.src.tar.xz
/lld-11.0.0.src.tar.xz.sig
/lld-11.0.1rc1.src.tar.xz
/lld-11.0.1rc1.src.tar.xz.sig
/lld-11.0.1rc2.src.tar.xz
/lld-11.0.1rc2.src.tar.xz.sig
/lld-11.0.1.src.tar.xz
/lld-11.0.1.src.tar.xz.sig
/lld-11.1.0rc1.src.tar.xz
/lld-11.1.0rc1.src.tar.xz.sig
/lld-11.1.0rc2.src.tar.xz
/lld-11.1.0rc2.src.tar.xz.sig
/lld-12.0.0rc1.src.tar.xz
/lld-12.0.0rc1.src.tar.xz.sig
/lld-12.0.0rc2.src.tar.xz
/lld-12.0.0rc2.src.tar.xz.sig
/lld-12.0.0rc3.src.tar.xz
/lld-12.0.0rc3.src.tar.xz.sig
/lld-12.0.0rc4.src.tar.xz
/lld-12.0.0rc4.src.tar.xz.sig
/lld-12.0.0rc5.src.tar.xz
/lld-12.0.0rc5.src.tar.xz.sig
/lld-12.0.0.src.tar.xz
/lld-12.0.0.src.tar.xz.sig
/lld-12.0.1.src.tar.xz
/lld-12.0.1.src.tar.xz.sig
/lld-13.0.0.src.tar.xz
/lld-13.0.0.src.tar.xz.sig
/lld-13.0.1.src.tar.xz
/lld-13.0.1.src.tar.xz.sig
/lld-14.0.0.src.tar.xz
/lld-14.0.0.src.tar.xz.sig
/lld-14.0.5.src.tar.xz
/lld-14.0.5.src.tar.xz.sig
/lld-14.0.6.src.tar.xz
/lld-14.0.6.src.tar.xz.sig
/lld-15.0.1.src.tar.xz
/lld-15.0.1.src.tar.xz.sig
/lld-15.0.6.src.tar.xz
/lld-15.0.6.src.tar.xz.sig
/lld-15.0.7.src.tar.xz
/lld-15.0.7.src.tar.xz.sig
/*.tar.xz
/*.tar.xz.sig
/*.src.rpm

View File

@ -1,48 +0,0 @@
From 760568cd24acd6ae9083b0dfea2c7c0ea6f0adc2 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Thu, 30 Aug 2018 08:53:56 -0700
Subject: [PATCH 1/2] [PATCH][lld] CMake: Check for gtest headers even if
lit.py is not present
This makes it possible to build the unittests even withotu a full
checkout of the llvm source tree.
---
lld/CMakeLists.txt | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
index d4e561b..a7406d1c 100644
--- a/lld/CMakeLists.txt
+++ b/lld/CMakeLists.txt
@@ -68,6 +68,15 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(LLVM_UTILS_PROVIDED ON)
endif()
+ # Check for gtest
+ set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
+ if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
+ AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
+ AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
+ add_subdirectory(${UNITTEST_DIR} utils/unittest)
+ endif()
+
+ # Check for lit
if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
# Note: path not really used, except for checking if lit was found
set(LLVM_LIT ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
@@ -77,12 +86,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(LLVM_UTILS_PROVIDED ON)
set(LLD_TEST_DEPS FileCheck not)
endif()
- set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
- if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
- AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
- AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
- add_subdirectory(${UNITTEST_DIR} utils/unittest)
- endif()
else()
# Seek installed Lit.
find_program(LLVM_LIT
--
1.8.3.1

View File

@ -0,0 +1,37 @@
From 56464ba865b7df5bf3edb9be7dc3b6a0fbe21e21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Mon, 13 Mar 2023 18:22:31 +0100
Subject: [PATCH] [lld] Use installed llvm_gtest in standalone builds
Use the installed llvm_gtest library instead of rebuilding it locally
when standalone builds are used. This change is now required
as otherwise the build fails due to duplicate llvm_gtest target.
This is based on 82169103958583d3320b3a9a1e6542e8d32ef8da in clang.
Differential Revision: https://reviews.llvm.org/D145964
---
lld/CMakeLists.txt | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
index 3d6225646fe6..1e9e47393196 100644
--- a/lld/CMakeLists.txt
+++ b/lld/CMakeLists.txt
@@ -75,11 +75,9 @@ if(LLD_BUILT_STANDALONE)
set(LLVM_UTILS_PROVIDED ON)
set(LLD_TEST_DEPS FileCheck not)
endif()
- set(UNITTEST_DIR ${LLVM_THIRD_PARTY_DIR}/unittest)
- if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
- AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
- AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
- add_subdirectory(${UNITTEST_DIR} third-party/unittest)
+
+ if (NOT TARGET llvm_gtest)
+ message(FATAL_ERROR "llvm-gtest not found. Please install llvm-gtest or disable tests with -DLLVM_INCLUDE_TESTS=OFF")
endif()
else()
# Seek installed Lit.
--
2.39.2

View File

@ -2,9 +2,10 @@
%bcond_without check
%global lld_srcdir lld-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
%global maj_ver 15
%global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
%global maj_ver 16
%global min_ver 0
%global patch_ver 7
%global patch_ver 1
%global pkg_name lld
%global install_prefix /usr
@ -13,18 +14,21 @@
Name: %{pkg_name}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
Release: 4%{?dist}
Release: 1%{?dist}
Summary: The LLVM Linker
License: NCSA
License: Apache-2.0 WITH LLVM-exception OR NCSA
URL: http://llvm.org
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz.sig
Source2: release-keys.asc
Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz
Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz.sig
Source4: release-keys.asc
ExcludeArch: s390x
Patch0: 0001-PATCH-lld-CMake-Check-for-gtest-headers-even-if-lit..patch
# Backport from LLVM 17.
Patch0: 0001-lld-Use-installed-llvm_gtest-in-standalone-builds.patch
# Bundle libunwind header need during build for MachO support
Patch1: 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch
@ -75,7 +79,13 @@ Shared libraries for LLD.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE3}' --data='%{SOURCE2}'
%setup -T -q -b 2 -n %{cmake_srcdir}
# TODO: It would be more elegant to set -DLLVM_COMMON_CMAKE_UTILS=%{_builddir}/%{cmake_srcdir},
# but this is not a CACHED variable, so we can't actually set it externally :(
cd ..
mv %{cmake_srcdir} cmake
%autosetup -n %{lld_srcdir} -p2
@ -151,6 +161,9 @@ fi
%changelog
* Wed Apr 19 2023 Nikita Popov <npopov@redhat.com> - 16.0.1-1
- Update to LLVM 16.0.1
* Tue Jan 31 2023 Konrad Kleine <kkleine@redhat.com> - 15.0.7-4
- Fixup for obsoleting lld-test < 15.0.7

View File

@ -1,2 +1,4 @@
SHA512 (lld-15.0.7.src.tar.xz) = 5dc0690c1eb3c37ee29c4add65a08f7b93ce1363cf9099243c9dc1124d1ca77fe19bbf24dad3984de4553eda716f706d49dff63461b709bec6645272e67f0178
SHA512 (lld-15.0.7.src.tar.xz.sig) = f0cf9c7ef3c99f17c40bd28436ecfdbd939f8e145f2ccc5f8c52ec846b633dc073e6bd5dc6cdc6ce213f7404a491ea992440b5d0ba080ba68aadf480f9a5d373
SHA512 (lld-16.0.1.src.tar.xz) = fe9566a1aeaafdd80568dfa9553936ecf144f79ec774bb02d85eb4e140d1a5434a953ddbd18e6c3f1413d37d21a48a7e6eff2c25ff622a50c6ca3af4c3dff61f
SHA512 (lld-16.0.1.src.tar.xz.sig) = a9ad4d394fa7998285e72596a1c7c15ddb8537a9ff19388c95487b75420cb745f52d6673540bcc6c86e950cd2a81485cfff9743cc846f14a80c50a4a69d98b6a
SHA512 (cmake-16.0.1.src.tar.xz) = 7a0f01a82660a953e06b1df267918542205ac46f151d284dca74255c36fe5ccd995266638a85ce502a81cdd5e76ff3311e5f8488e09d0abbf22ee07cec186f5f
SHA512 (cmake-16.0.1.src.tar.xz.sig) = 8d49050e9b04df253a5bb2fa3b27796f204d085610432826bef6bb6cab876990d67e7fd5267fc89fadf21d88da73c535c82ae6ea0e1c867f7cd5efac244b0fa2