LLVM 11.0.0-rc1 Release

Also make llvm-devel require llvm-static and llvm-test.
This commit is contained in:
Tom Stellard 2020-02-20 20:41:28 +00:00
parent 40207a4ea9
commit 992907b031
7 changed files with 23 additions and 221 deletions

2
.gitignore vendored
View file

@ -68,3 +68,5 @@
/llvm-10.0.0rc6.src.tar.xz.sig
/llvm-10.0.0.src.tar.xz
/llvm-10.0.0.src.tar.xz.sig
/llvm-11.0.0rc1.src.tar.xz
/llvm-11.0.0rc1.src.tar.xz.sig

View file

@ -1,66 +0,0 @@
From 8f6917ea11bd1bfbfe07f3577756d1c4abfdb916 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Fri, 6 Sep 2019 11:03:18 -0700
Subject: [PATCH] CMake: Split static library exports into their own export
file
---
llvm/cmake/modules/AddLLVM.cmake | 6 +++++-
llvm/cmake/modules/CMakeLists.txt | 3 +++
llvm/cmake/modules/LLVMConfig.cmake.in | 2 ++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 619e986..200fc45 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -691,7 +691,11 @@ macro(add_llvm_library name)
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
(in_llvm_libs AND "llvm-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS) OR
NOT LLVM_DISTRIBUTION_COMPONENTS)
- set(export_to_llvmexports EXPORT LLVMExports)
+ if (ARG_SHARED)
+ set(export_to_llvmexports EXPORT LLVMExports)
+ else()
+ set(export_to_llvmexports EXPORT LLVMStaticExports)
+ endif()
set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
endif()
diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
index 9cf22b4..dc982d2 100644
--- a/llvm/cmake/modules/CMakeLists.txt
+++ b/llvm/cmake/modules/CMakeLists.txt
@@ -105,6 +105,7 @@ set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS}")
+set(LLVM_CONFIG_STATIC_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake")
configure_file(
LLVMConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LLVMConfig.cmake
@@ -121,6 +122,8 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
if(llvm_has_exports)
install(EXPORT LLVMExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
COMPONENT cmake-exports)
+ install(EXPORT LLVMStaticExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
+ COMPONENT cmake-exports)
endif()
install(FILES
diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
index 536031f..6ef54a0 100644
--- a/llvm/cmake/modules/LLVMConfig.cmake.in
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in
@@ -89,6 +89,8 @@ if(NOT TARGET LLVMSupport)
set(LLVM_EXPORTED_TARGETS "@LLVM_CONFIG_EXPORTS@")
include("@LLVM_CONFIG_EXPORTS_FILE@")
@llvm_config_include_buildtree_only_exports@
+
+ include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
endif()
# By creating intrinsics_gen here, subprojects that depend on LLVM's
--
1.8.3.1

View file

@ -1,65 +0,0 @@
From 9d496e978f59e153bb76e92229d5a524d92dee04 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Tue, 10 Sep 2019 13:33:48 -0700
Subject: [PATCH] CMake: Split test binary exports into their own export file
---
llvm/cmake/modules/AddLLVM.cmake | 7 ++++++-
llvm/cmake/modules/CMakeLists.txt | 3 +++
llvm/cmake/modules/LLVMConfig.cmake.in | 1 +
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 200fc45..9eec7a7 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -953,7 +953,12 @@ macro(add_llvm_utility name)
set(export_to_llvmexports)
if (${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
NOT LLVM_DISTRIBUTION_COMPONENTS)
- set(export_to_llvmexports EXPORT LLVMExports)
+ if (${name} STREQUAL "not" OR ${name} STREQUAL "count" OR
+ ${name} STREQUAL "yaml-bench" OR ${name} STREQUAL "lli-child-target")
+ set(export_to_llvmexports EXPORT LLVMTestExports)
+ else()
+ set(export_to_llvmexports EXPORT LLVMExports)
+ endif()
set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
endif()
diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
index dc982d2..c861f45 100644
--- a/llvm/cmake/modules/CMakeLists.txt
+++ b/llvm/cmake/modules/CMakeLists.txt
@@ -106,6 +106,7 @@ set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS}")
set(LLVM_CONFIG_STATIC_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake")
+set(LLVM_CONFIG_TEST_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMTestExports.cmake")
configure_file(
LLVMConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LLVMConfig.cmake
@@ -124,6 +125,8 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
COMPONENT cmake-exports)
install(EXPORT LLVMStaticExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
COMPONENT cmake-exports)
+ install(EXPORT LLVMTestExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
+ COMPONENT cmake-exports)
endif()
install(FILES
diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
index 6ef54a0..d81b09a 100644
--- a/llvm/cmake/modules/LLVMConfig.cmake.in
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in
@@ -91,6 +91,7 @@ if(NOT TARGET LLVMSupport)
@llvm_config_include_buildtree_only_exports@
include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
+ include("@LLVM_CONFIG_TEST_EXPORTS_FILE@" OPTIONAL)
endif()
# By creating intrinsics_gen here, subprojects that depend on LLVM's
--
1.8.3.1

View file

@ -1,50 +0,0 @@
From 352558e69b3691cfdc8e1adc2a1fbb737bc67cbb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Tue, 16 Jun 2020 12:16:52 +0200
Subject: [PATCH] [llvm] Avoid linking llvm-cfi-verify to duplicate libs
Fix the CMake rules for LLVMCFIVerify library not to pull duplicate
LLVM .a libraries when linking to the dylib. This prevents problems
due to duplicate symbols and apparently fixes mingw32.
This is an alternative approach to D44650 that just forces .a libraries
instead. However, there doesn't seem to be any reason to do that.
Differential Revision: https://reviews.llvm.org/D81921
---
llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt | 20 +++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt b/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt
index 82ca42e624a..41d55ed9321 100644
--- a/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt
+++ b/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt
@@ -7,13 +7,17 @@ add_library(LLVMCFIVerify
)
llvm_update_compile_flags(LLVMCFIVerify)
-llvm_map_components_to_libnames(libs
- DebugInfoDWARF
- MC
- MCParser
- Object
- Support
- Symbolize
- )
+if (LLVM_LINK_LLVM_DYLIB)
+ set(libs LLVM)
+else()
+ llvm_map_components_to_libnames(libs
+ DebugInfoDWARF
+ MC
+ MCParser
+ Object
+ Support
+ Symbolize
+ )
+endif()
target_link_libraries(LLVMCFIVerify ${libs})
set_target_properties(LLVMCFIVerify PROPERTIES FOLDER "Libraries")
--
2.18.1

View file

@ -1,23 +0,0 @@
From bab5908df544680ada0a3cf431f55aeccfbdb321 Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton@redhat.com>
Date: Mon, 13 Apr 2020 13:44:15 +0200
Subject: [PATCH] Normalize working directory when running llvm-mc in test
Otherwise, depending on the lit location used to run the test, llvm-mc adds an
include_directories entry in the dwarf output, which breaks tests in some setup.
Differential Revision: https://reviews.llvm.org/D77876
---
llvm/test/MC/MachO/gen-dwarf.s | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/test/MC/MachO/gen-dwarf.s b/llvm/test/MC/MachO/gen-dwarf.s
index 0813856d625f..6d39d278e818 100644
--- a/llvm/test/MC/MachO/gen-dwarf.s
+++ b/llvm/test/MC/MachO/gen-dwarf.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -g -triple i386-apple-darwin10 %s -filetype=obj -o %t
+// RUN: mkdir -p %t0 && cd %t0 && llvm-mc -g -triple i386-apple-darwin10 %s -filetype=obj -o %t
// RUN: llvm-dwarfdump -all %t | FileCheck %s
.globl _bar

View file

@ -10,10 +10,10 @@
%global llvm_libdir %{_libdir}/%{name}
%global build_llvm_libdir %{buildroot}%{llvm_libdir}
#%%global rc_ver 6
%global baserelease 10
%global rc_ver 1
%global baserelease 0.1
%global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src
%global maj_ver 10
%global maj_ver 11
%global min_ver 0
%global patch_ver 0
@ -57,12 +57,6 @@ Source2: lit.fedora.cfg.py
%endif
Source4: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc
Patch0: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch
%if %{without compat_build}
Patch1: 0001-CMake-Split-test-binary-exports-into-their-own-expor.patch
%endif
Patch2: bab5908df544680ada0a3cf431f55aeccfbdb321.patch
Patch3: 0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
BuildRequires: gcc
BuildRequires: gcc-c++
@ -108,6 +102,15 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
# app that requires the libLLVMLineEditor, so we need to make sure
# libedit-devel is available.
Requires: libedit-devel
# The installed cmake files reference binaries from llvm-test and llvm-static.
# We tried in the past to split the cmake exports for these binaries out into
# separate files, so that llvm-devel would not need to Require these packages,
# but this caused bugs (rhbz#1773678) and forced us to carry two non-upstream
# patches.
Requires: llvm-static%{?_isa} = %{version}-%{release}
Requires: llvm-test%{?_isa} = %{version}-%{release}
Requires(post): %{_sbindir}/alternatives
Requires(postun): %{_sbindir}/alternatives
@ -181,9 +184,10 @@ pathfix.py -i %{__python3} -pn \
# LLVM-Unit :: Target/AArch64/./AArch64Tests/InstSizes.PATCHPOINT
# LLVM-Unit :: Target/AArch64/./AArch64Tests/InstSizes.STACKMAP
# LLVM-Unit :: Target/AArch64/./AArch64Tests/InstSizes.TLSDESC_CALLSEQ
%ifarch s390x
# On X86_64, LTO builds of TableGen crash. This can be reproduced by:
# %%cmake_build --target include/llvm/IR/IntrinsicsAArch64.h
# Because of these failures, lto is disabled for now.
%global _lto_cflags %{nil}
%endif
%ifarch s390 %{arm} %ix86
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
@ -469,8 +473,6 @@ fi
%{_includedir}/llvm-c
%{_libdir}/libLLVM.so
%{_libdir}/cmake/llvm
%exclude %{_libdir}/cmake/llvm/LLVMStaticExports.cmake
%exclude %{_libdir}/cmake/llvm/LLVMTestExports.cmake
%else
%{_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%{pkg_bindir}/llvm-config
@ -493,7 +495,6 @@ fi
%if %{without compat_build}
%{_libdir}/*.a
%exclude %{_libdir}/libLLVMTestingSupport.a
%{_libdir}/cmake/llvm/LLVMStaticExports.cmake
%else
%{_libdir}/%{name}/lib/*.a
%endif
@ -517,7 +518,6 @@ fi
%{_bindir}/llvm-opt-fuzzer
%{_libdir}/BugpointPasses.so
%{_libdir}/LLVMHello.so
%{_libdir}/cmake/llvm/LLVMTestExports.cmake
%files googletest
%license LICENSE.TXT
@ -527,6 +527,10 @@ fi
%endif
%changelog
* Thu Aug 06 2020 Tom Stellard <tstellar@redhat.com> - 11.0.0-0.1-rc1
- LLVM 11.0.0-rc1 Release
- Make llvm-devel require llvm-static and llvm-test
* Tue Aug 04 2020 Tom Stellard <tstellar@redhat.com> - 10.0.0-10
- Backport upstream patch to fix build with -flto.
- Disable LTO on s390x to work-around unit test failures.

View file

@ -1,2 +1,2 @@
SHA512 (llvm-10.0.0.src.tar.xz) = 7dc961aacee3a01ecc002ff2b688a2ef50661856d2abd5ecc90566ffcad7566e4976736cd339ea96592e452cd5a17aaceba9712b2effec805661cca8ff020ee7
SHA512 (llvm-10.0.0.src.tar.xz.sig) = 2e4c61af5d84db4bc7a8ab51367210c529ae02e401b7a73a449f79bf9d92654ccf36fdef0f552c8850df0e94bcafce2359180ad0cdf720be7c874a782a936878
SHA512 (llvm-11.0.0rc1.src.tar.xz) = 2e07ca946ca3865990670b82d265c8a024e116a052f533c652db025d248cc08c373e00d96eac2147e0ff74db29a874e85ec5d6a7ea10031908accf3b4165ebb3
SHA512 (llvm-11.0.0rc1.src.tar.xz.sig) = a3dc7a832022b1f4470447daa00b0dd22c46583b213594a623335657ac68f37556b5d49df490ee13f21715863060e4ca6f1f98124fc0e272ddfa008aba274bbb