mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-11-28 10:35:42 +00:00
Update to LLVM 17.0.0 RC1
This is also a squashed merge commit from upstream-snapshot (commit ID
340b9e8ea3
) into rawhide whose most important commits from
upstream-snapshot are:
Konrad Kleine (50):
Prepare for snapshot build
Fix RPM build errors: File not found: /builddir/build/BUILDROOT/llvm-14.0.0~pre20211103.g1febf42f03f664-1.fc34.x86_64/usr/lib64/libLLVM-14.so
Added back patch file
Rebased with new patches from rawhide that weren't yet in the streamline branch
Fix RPM build errors: File not found: /builddir/build/BUILDROOT/llvm-14.0.0~pre20211103.g1febf42f03f664-1.fc34.x86_64/usr/lib64/libLLVM-14.so
Disable LTO for anything older than Fedora 34
Use llvm_snapshot_version_suffix
Remove patch for https://reviews.llvm.org/D108332 which is already upstream
Only package cmake-devel when building a snapshot package and when NOT building in compat mode
Fix RPM build
Fix Macro expanded in comment on line 586: %{_libdir}/libLLVM-%{maj_ver}
Fix rpm build warning/error: absolute symlink
Default to DWARF4
Merge remote-tracking branch 'upstream/rawhide' into upstream-snapshot
Rebased patched on pagure/streamline
Merge remote-tracking branch 'upstream/rawhide' into upstream-snapshot
Added 0004-PATCH-clang-Revert-cmake-Don-t-install-plugins-used-.patch
Revert "Added 0004-PATCH-clang-Revert-cmake-Don-t-install-plugins-used-.patch"
Workaround linker error: memory exhausted
Merge remote-tracking branch 'upstream/rawhide' into upstream-snapshot
Added pgo_instrumented_build cmake args
Fix /usr/bin/ld: cannot find /usr/lib64/clang/13.0.0/lib/linux/libclang_rt.profile-x86_64.a: No such file or directory
Move bcond in cmake down in case we want to override stuff
Make llvm use the llvm-snapshot-builder as well
Use %{llvm_snapshot_extra_source_tags} macro
Merge remote-tracking branch 'upstream/rawhide' into upstream-snapshot
Merge remote-tracking branch 'upstream/rawhide' into upstream-snapshot
Patch renewal from rebased llvm-project pagure/streamline branch
Try to lock llvm* and clang* packages so that we don't install LLVM from a previous copr build
Revert "Try to lock llvm* and clang* packages so that we don't install LLVM from a previous copr build"
Rebase onto pagure/main
Merge remote-tracking branch 'upstream/rawhide' into upstream-snapshot
use llvm+cmake tarballs instead of big llvm-project and close unclosed %if
Fixup: clang->cmake
Move globals down for them to be expanded correctly
Fix merge issue with patch
Test without some patches
Compiles and installs again
Adapt to standalone third-party dir
bring back files to llvm-googletest package
fixing path to unittest
Manually add https://reviews.llvm.org/D137890
Add missing patch files
Apply patchfiles independently for llvm and third-party dir
List third-party gmock/gtest files in install
Merge remote-tracking branch 'origin/rawhide' into upstream-snapshot
Re-enable patches for gtest
Disable LTO to speed up builds
Added libLLVMTestingAnnotations.a to googletest subpackage
Merge remote-tracking branch 'origin/rawhide' into upstream-snapshot
Nikita Popov (1):
Sync with rawhide
Tom Stellard (13):
Add patch to fix some lit test failures
Revert "Add patch to fix some lit test failures"
Add a patch from main branch to fix some lit tests
Revert "Add a patch from main branch to fix some lit tests"
Remove patch applied upstream
Remove another upstreamed patch
Add llvm-googletest dependency to llvm-devel
Add JITLink patch to fix clang failures on aarch64 with libgcc-13
Revert "Add JITLink patch to fix clang failures on aarch64 with libgcc-13"
Fix a test failure on s390x
Revert "Fix a test failure on s390x"
copr: Install llvm-snapshot-builder from the local COPR project
Sync with rawhide
sergesanspaille (1):
Rebase downstream patches
This commit is contained in:
parent
5e22fb4ab6
commit
d5b39fd081
7 changed files with 71 additions and 329 deletions
17
.copr/Makefile
Normal file
17
.copr/Makefile
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# See https://docs.pagure.org/copr.copr/user_documentation.html#make-srpm
|
||||||
|
# See for the --setopt option in the enabling of copr repo see:
|
||||||
|
# https://pagure.io/copr/copr/issue/184
|
||||||
|
|
||||||
|
COPR_USERNAME=$(shell rpm --eval %copr_username)
|
||||||
|
COPR_PROJECT=$(shell rpm --eval %copr_projectname)
|
||||||
|
|
||||||
|
.PHONY: srpm
|
||||||
|
srpm:
|
||||||
|
dnf install -y dnf-plugins-core fedora-packager
|
||||||
|
dnf copr enable -y --setopt=reposdir=/tmp/yum.repos.d $(COPR_USERNAME)/$(COPR_PROJECT)
|
||||||
|
dnf install -y --setopt=reposdir=/tmp/yum.repos.d llvm-snapshot-builder
|
||||||
|
rpmbuild \
|
||||||
|
--define "_srcrpmdir $(outdir)" \
|
||||||
|
--define "_sourcedir $(shell pwd)" \
|
||||||
|
--define "_disable_source_fetch 0" \
|
||||||
|
-bs $(spec)
|
|
@ -1,184 +0,0 @@
|
||||||
From efbaf8bc61f4c0e29a3eaafb11ac0ddda8bd3dff Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ulrich Weigand <ulrich.weigand@de.ibm.com>
|
|
||||||
Date: Fri, 30 Jun 2023 16:02:56 +0200
|
|
||||||
Subject: [PATCH] [SystemZ] Improve error messages for unsupported relocations
|
|
||||||
|
|
||||||
In the SystemZMCObjectWriter, we currently just abort in case
|
|
||||||
some unsupported relocation in requested. However, as this
|
|
||||||
situation can be triggered by invalid (inline) assembler input,
|
|
||||||
we should really get a regular error message instead.
|
|
||||||
---
|
|
||||||
.../MCTargetDesc/SystemZMCObjectWriter.cpp | 59 +++++++++++--------
|
|
||||||
1 file changed, 35 insertions(+), 24 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp
|
|
||||||
index c23463ab9bde..0b11468afc52 100644
|
|
||||||
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp
|
|
||||||
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp
|
|
||||||
@@ -9,6 +9,7 @@
|
|
||||||
#include "MCTargetDesc/SystemZMCFixups.h"
|
|
||||||
#include "MCTargetDesc/SystemZMCTargetDesc.h"
|
|
||||||
#include "llvm/BinaryFormat/ELF.h"
|
|
||||||
+#include "llvm/MC/MCContext.h"
|
|
||||||
#include "llvm/MC/MCELFObjectWriter.h"
|
|
||||||
#include "llvm/MC/MCExpr.h"
|
|
||||||
#include "llvm/MC/MCFixup.h"
|
|
||||||
@@ -40,7 +41,7 @@ SystemZObjectWriter::SystemZObjectWriter(uint8_t OSABI)
|
|
||||||
/*HasRelocationAddend_=*/ true) {}
|
|
||||||
|
|
||||||
// Return the relocation type for an absolute value of MCFixupKind Kind.
|
|
||||||
-static unsigned getAbsoluteReloc(unsigned Kind) {
|
|
||||||
+static unsigned getAbsoluteReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) {
|
|
||||||
switch (Kind) {
|
|
||||||
case FK_Data_1: return ELF::R_390_8;
|
|
||||||
case FK_Data_2: return ELF::R_390_16;
|
|
||||||
@@ -49,11 +50,12 @@ static unsigned getAbsoluteReloc(unsigned Kind) {
|
|
||||||
case SystemZ::FK_390_12: return ELF::R_390_12;
|
|
||||||
case SystemZ::FK_390_20: return ELF::R_390_20;
|
|
||||||
}
|
|
||||||
- llvm_unreachable("Unsupported absolute address");
|
|
||||||
+ Ctx.reportError(Loc, "Unsupported absolute address");
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the relocation type for a PC-relative value of MCFixupKind Kind.
|
|
||||||
-static unsigned getPCRelReloc(unsigned Kind) {
|
|
||||||
+static unsigned getPCRelReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) {
|
|
||||||
switch (Kind) {
|
|
||||||
case FK_Data_2: return ELF::R_390_PC16;
|
|
||||||
case FK_Data_4: return ELF::R_390_PC32;
|
|
||||||
@@ -63,62 +65,69 @@ static unsigned getPCRelReloc(unsigned Kind) {
|
|
||||||
case SystemZ::FK_390_PC24DBL: return ELF::R_390_PC24DBL;
|
|
||||||
case SystemZ::FK_390_PC32DBL: return ELF::R_390_PC32DBL;
|
|
||||||
}
|
|
||||||
- llvm_unreachable("Unsupported PC-relative address");
|
|
||||||
+ Ctx.reportError(Loc, "Unsupported PC-relative address");
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the R_390_TLS_LE* relocation type for MCFixupKind Kind.
|
|
||||||
-static unsigned getTLSLEReloc(unsigned Kind) {
|
|
||||||
+static unsigned getTLSLEReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) {
|
|
||||||
switch (Kind) {
|
|
||||||
case FK_Data_4: return ELF::R_390_TLS_LE32;
|
|
||||||
case FK_Data_8: return ELF::R_390_TLS_LE64;
|
|
||||||
}
|
|
||||||
- llvm_unreachable("Unsupported absolute address");
|
|
||||||
+ Ctx.reportError(Loc, "Unsupported thread-local address (local-exec)");
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the R_390_TLS_LDO* relocation type for MCFixupKind Kind.
|
|
||||||
-static unsigned getTLSLDOReloc(unsigned Kind) {
|
|
||||||
+static unsigned getTLSLDOReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) {
|
|
||||||
switch (Kind) {
|
|
||||||
case FK_Data_4: return ELF::R_390_TLS_LDO32;
|
|
||||||
case FK_Data_8: return ELF::R_390_TLS_LDO64;
|
|
||||||
}
|
|
||||||
- llvm_unreachable("Unsupported absolute address");
|
|
||||||
+ Ctx.reportError(Loc, "Unsupported thread-local address (local-dynamic)");
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the R_390_TLS_LDM* relocation type for MCFixupKind Kind.
|
|
||||||
-static unsigned getTLSLDMReloc(unsigned Kind) {
|
|
||||||
+static unsigned getTLSLDMReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) {
|
|
||||||
switch (Kind) {
|
|
||||||
case FK_Data_4: return ELF::R_390_TLS_LDM32;
|
|
||||||
case FK_Data_8: return ELF::R_390_TLS_LDM64;
|
|
||||||
case SystemZ::FK_390_TLS_CALL: return ELF::R_390_TLS_LDCALL;
|
|
||||||
}
|
|
||||||
- llvm_unreachable("Unsupported absolute address");
|
|
||||||
+ Ctx.reportError(Loc, "Unsupported thread-local address (local-dynamic)");
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the R_390_TLS_GD* relocation type for MCFixupKind Kind.
|
|
||||||
-static unsigned getTLSGDReloc(unsigned Kind) {
|
|
||||||
+static unsigned getTLSGDReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) {
|
|
||||||
switch (Kind) {
|
|
||||||
case FK_Data_4: return ELF::R_390_TLS_GD32;
|
|
||||||
case FK_Data_8: return ELF::R_390_TLS_GD64;
|
|
||||||
case SystemZ::FK_390_TLS_CALL: return ELF::R_390_TLS_GDCALL;
|
|
||||||
}
|
|
||||||
- llvm_unreachable("Unsupported absolute address");
|
|
||||||
+ Ctx.reportError(Loc, "Unsupported thread-local address (general-dynamic)");
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the PLT relocation counterpart of MCFixupKind Kind.
|
|
||||||
-static unsigned getPLTReloc(unsigned Kind) {
|
|
||||||
+static unsigned getPLTReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) {
|
|
||||||
switch (Kind) {
|
|
||||||
case SystemZ::FK_390_PC12DBL: return ELF::R_390_PLT12DBL;
|
|
||||||
case SystemZ::FK_390_PC16DBL: return ELF::R_390_PLT16DBL;
|
|
||||||
case SystemZ::FK_390_PC24DBL: return ELF::R_390_PLT24DBL;
|
|
||||||
case SystemZ::FK_390_PC32DBL: return ELF::R_390_PLT32DBL;
|
|
||||||
}
|
|
||||||
- llvm_unreachable("Unsupported absolute address");
|
|
||||||
+ Ctx.reportError(Loc, "Unsupported PC-relative PLT address");
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned SystemZObjectWriter::getRelocType(MCContext &Ctx,
|
|
||||||
const MCValue &Target,
|
|
||||||
const MCFixup &Fixup,
|
|
||||||
bool IsPCRel) const {
|
|
||||||
+ SMLoc Loc = Fixup.getLoc();
|
|
||||||
unsigned Kind = Fixup.getKind();
|
|
||||||
if (Kind >= FirstLiteralRelocationKind)
|
|
||||||
return Kind - FirstLiteralRelocationKind;
|
|
||||||
@@ -126,38 +135,40 @@ unsigned SystemZObjectWriter::getRelocType(MCContext &Ctx,
|
|
||||||
switch (Modifier) {
|
|
||||||
case MCSymbolRefExpr::VK_None:
|
|
||||||
if (IsPCRel)
|
|
||||||
- return getPCRelReloc(Kind);
|
|
||||||
- return getAbsoluteReloc(Kind);
|
|
||||||
+ return getPCRelReloc(Ctx, Loc, Kind);
|
|
||||||
+ return getAbsoluteReloc(Ctx, Loc, Kind);
|
|
||||||
|
|
||||||
case MCSymbolRefExpr::VK_NTPOFF:
|
|
||||||
assert(!IsPCRel && "NTPOFF shouldn't be PC-relative");
|
|
||||||
- return getTLSLEReloc(Kind);
|
|
||||||
+ return getTLSLEReloc(Ctx, Loc, Kind);
|
|
||||||
|
|
||||||
case MCSymbolRefExpr::VK_INDNTPOFF:
|
|
||||||
if (IsPCRel && Kind == SystemZ::FK_390_PC32DBL)
|
|
||||||
return ELF::R_390_TLS_IEENT;
|
|
||||||
- llvm_unreachable("Only PC-relative INDNTPOFF accesses are supported for now");
|
|
||||||
+ Ctx.reportError(Loc, "Only PC-relative INDNTPOFF accesses are supported for now");
|
|
||||||
+ return 0;
|
|
||||||
|
|
||||||
case MCSymbolRefExpr::VK_DTPOFF:
|
|
||||||
assert(!IsPCRel && "DTPOFF shouldn't be PC-relative");
|
|
||||||
- return getTLSLDOReloc(Kind);
|
|
||||||
+ return getTLSLDOReloc(Ctx, Loc, Kind);
|
|
||||||
|
|
||||||
case MCSymbolRefExpr::VK_TLSLDM:
|
|
||||||
assert(!IsPCRel && "TLSLDM shouldn't be PC-relative");
|
|
||||||
- return getTLSLDMReloc(Kind);
|
|
||||||
+ return getTLSLDMReloc(Ctx, Loc, Kind);
|
|
||||||
|
|
||||||
case MCSymbolRefExpr::VK_TLSGD:
|
|
||||||
assert(!IsPCRel && "TLSGD shouldn't be PC-relative");
|
|
||||||
- return getTLSGDReloc(Kind);
|
|
||||||
+ return getTLSGDReloc(Ctx, Loc, Kind);
|
|
||||||
|
|
||||||
case MCSymbolRefExpr::VK_GOT:
|
|
||||||
if (IsPCRel && Kind == SystemZ::FK_390_PC32DBL)
|
|
||||||
return ELF::R_390_GOTENT;
|
|
||||||
- llvm_unreachable("Only PC-relative GOT accesses are supported for now");
|
|
||||||
+ Ctx.reportError(Loc, "Only PC-relative GOT accesses are supported for now");
|
|
||||||
+ return 0;
|
|
||||||
|
|
||||||
case MCSymbolRefExpr::VK_PLT:
|
|
||||||
- assert(IsPCRel && "@PLT shouldt be PC-relative");
|
|
||||||
- return getPLTReloc(Kind);
|
|
||||||
+ assert(IsPCRel && "@PLT shouldn't be PC-relative");
|
|
||||||
+ return getPLTReloc(Ctx, Loc, Kind);
|
|
||||||
|
|
||||||
default:
|
|
||||||
llvm_unreachable("Modifier not supported");
|
|
||||||
--
|
|
||||||
2.41.0
|
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
From cf35b4622d31701d0c79e0441931518726f997f2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nikita Popov <npopov@redhat.com>
|
|
||||||
Date: Fri, 30 Jun 2023 12:25:09 +0200
|
|
||||||
Subject: [PATCH] Add LLVM_UNITTEST_LINK_FLAGS option
|
|
||||||
|
|
||||||
This allows specifying linker flags that should only be applied
|
|
||||||
to unit tests, e.g. to disable LTO optimization for them.
|
|
||||||
---
|
|
||||||
llvm/cmake/modules/AddLLVM.cmake | 2 ++
|
|
||||||
llvm/cmake/modules/HandleLLVMOptions.cmake | 3 +++
|
|
||||||
2 files changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
|
|
||||||
index 94fc83db9344..7cf75223ce38 100644
|
|
||||||
--- a/llvm/cmake/modules/AddLLVM.cmake
|
|
||||||
+++ b/llvm/cmake/modules/AddLLVM.cmake
|
|
||||||
@@ -1592,6 +1592,8 @@ function(add_unittest test_suite test_name)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
+ target_link_options(${test_name} PRIVATE "${LLVM_UNITTEST_LINK_FLAGS}")
|
|
||||||
+
|
|
||||||
set(outdir ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR})
|
|
||||||
set_output_directory(${test_name} BINARY_DIR ${outdir} LIBRARY_DIR ${outdir})
|
|
||||||
# libpthreads overrides some standard library symbols, so main
|
|
||||||
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
|
|
||||||
index 6119ecdce0f4..eec98162c2d7 100644
|
|
||||||
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
|
|
||||||
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
|
|
||||||
@@ -1274,3 +1274,6 @@ endif()
|
|
||||||
|
|
||||||
set(LLVM_THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../third-party CACHE STRING
|
|
||||||
"Directory containing third party software used by LLVM (e.g. googletest)")
|
|
||||||
+
|
|
||||||
+set(LLVM_UNITTEST_LINK_FLAGS "" CACHE STRING
|
|
||||||
+ "Additional linker flags for unit tests")
|
|
||||||
--
|
|
||||||
2.40.1
|
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
From 8cc3870f09d728d9017c72eba9520117a4283fee Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tom Stellard <tstellar@redhat.com>
|
|
||||||
Date: Thu, 17 Nov 2022 09:01:10 +0000
|
|
||||||
Subject: Add install targets for gtest
|
|
||||||
|
|
||||||
Stand-alone builds need an installed version of gtest in order to run
|
|
||||||
the unittests.
|
|
||||||
|
|
||||||
Differential Revision: https://reviews.llvm.org/D137890
|
|
||||||
---
|
|
||||||
llvm/CMakeLists.txt | 5 +++++
|
|
||||||
1 file changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
|
|
||||||
index 60e1f29620af..d91338532815 100644
|
|
||||||
--- a/llvm/CMakeLists.txt
|
|
||||||
+++ b/llvm/CMakeLists.txt
|
|
||||||
@@ -693,6 +693,11 @@ option(LLVM_BUILD_TESTS
|
|
||||||
"Build LLVM unit tests. If OFF, just generate build targets." OFF)
|
|
||||||
option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON)
|
|
||||||
|
|
||||||
+option(LLVM_INSTALL_GTEST
|
|
||||||
+ "Install the llvm gtest library. This should be on if you want to do
|
|
||||||
+ stand-alone builds of the other projects and run their unit tests." OFF)
|
|
||||||
+
|
|
||||||
+
|
|
||||||
option(LLVM_BUILD_BENCHMARKS "Add LLVM benchmark targets to the list of default
|
|
||||||
targets. If OFF, benchmarks still could be built using Benchmarks target." OFF)
|
|
||||||
option(LLVM_INCLUDE_BENCHMARKS "Generate benchmark targets. If OFF, benchmarks can't be built." ON)
|
|
||||||
--
|
|
||||||
2.34.3
|
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
From 8cc3870f09d728d9017c72eba9520117a4283fee Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tom Stellard <tstellar@redhat.com>
|
|
||||||
Date: Thu, 17 Nov 2022 09:01:10 +0000
|
|
||||||
Subject: Add install targets for gtest
|
|
||||||
|
|
||||||
Stand-alone builds need an installed version of gtest in order to run
|
|
||||||
the unittests.
|
|
||||||
|
|
||||||
Differential Revision: https://reviews.llvm.org/D137890
|
|
||||||
---
|
|
||||||
third-party/unittest/CMakeLists.txt | 15 ++++++++++++++-
|
|
||||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/third-party/unittest/CMakeLists.txt b/third-party/unittest/CMakeLists.txt
|
|
||||||
index 0e54e0e57c35..1d2a52730d7d 100644
|
|
||||||
--- a/third-party/unittest/CMakeLists.txt
|
|
||||||
+++ b/third-party/unittest/CMakeLists.txt
|
|
||||||
@@ -65,12 +65,25 @@ if (NOT LLVM_ENABLE_THREADS)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
target_include_directories(llvm_gtest
|
|
||||||
- PUBLIC googletest/include googlemock/include
|
|
||||||
+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/googletest/include>
|
|
||||||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/googlemock/include>
|
|
||||||
+ $<INSTALL_INTERFACE:include/llvm-gtest/>
|
|
||||||
+ $<INSTALL_INTERFACE:include/llvm-gmock/>
|
|
||||||
PRIVATE googletest googlemock
|
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectory(UnitTestMain)
|
|
||||||
|
|
||||||
+if (LLVM_INSTALL_GTEST)
|
|
||||||
+export(TARGETS llvm_gtest llvm_gtest_main LLVMTestingSupport FILE LLVMGTestConfig.cmake)
|
|
||||||
+install(TARGETS llvm_gtest llvm_gtest_main LLVMTestingSupport EXPORT LLVMGTestConfig
|
|
||||||
+ ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT llvm_gtest)
|
|
||||||
+ install(EXPORT LLVMGTestConfig DESTINATION ${LLVM_INSTALL_PACKAGE_DIR} COMPONENT llvm_gtest)
|
|
||||||
+ add_llvm_install_targets(install-llvm_gtest COMPONENT llvm_gtest DEPENDS llvm_gtest LLVMGTestConfig.cmake)
|
|
||||||
+ install(DIRECTORY googletest/include/gtest/ DESTINATION include/llvm-gtest/gtest/ COMPONENT llvm_gtest)
|
|
||||||
+ install(DIRECTORY googlemock/include/gmock/ DESTINATION include/llvm-gmock/gmock/ COMPONENT llvm_gtest)
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
# When LLVM_LINK_LLVM_DYLIB is enabled, libLLVM.so is added to the interface
|
|
||||||
# link libraries for gtest and gtest_main. This means that any target, like
|
|
||||||
# unittests for example, that links against gtest will be forced to link
|
|
||||||
--
|
|
||||||
2.34.3
|
|
||||||
|
|
69
llvm.spec
69
llvm.spec
|
@ -1,3 +1,10 @@
|
||||||
|
%bcond_with snapshot_build
|
||||||
|
|
||||||
|
%if %{with snapshot_build}
|
||||||
|
# Unlock LLVM Snapshot LUA functions
|
||||||
|
%{llvm_sb}
|
||||||
|
%endif
|
||||||
|
|
||||||
# We are building with clang for faster/lower memory LTO builds.
|
# We are building with clang for faster/lower memory LTO builds.
|
||||||
# See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_macros
|
# See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_macros
|
||||||
%global toolchain clang
|
%global toolchain clang
|
||||||
|
@ -17,10 +24,18 @@
|
||||||
%bcond_with compat_build
|
%bcond_with compat_build
|
||||||
%bcond_without check
|
%bcond_without check
|
||||||
|
|
||||||
#global rc_ver 4
|
%global maj_ver 17
|
||||||
%global maj_ver 16
|
|
||||||
%global min_ver 0
|
%global min_ver 0
|
||||||
%global patch_ver 6
|
%global patch_ver 0
|
||||||
|
%global rc_ver 1
|
||||||
|
|
||||||
|
%if %{with snapshot_build}
|
||||||
|
%undefine rc_ver
|
||||||
|
%global maj_ver %{llvm_snapshot_version_major}
|
||||||
|
%global min_ver %{llvm_snapshot_version_minor}
|
||||||
|
%global patch_ver %{llvm_snapshot_version_patch}
|
||||||
|
%endif
|
||||||
|
|
||||||
%global llvm_srcdir llvm-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
%global llvm_srcdir llvm-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
||||||
%global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
%global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
||||||
%global third_party_srcdir third-party-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
%global third_party_srcdir third-party-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
||||||
|
@ -74,12 +89,18 @@
|
||||||
%undefine _py3_shebang_P
|
%undefine _py3_shebang_P
|
||||||
|
|
||||||
Name: %{pkg_name}
|
Name: %{pkg_name}
|
||||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
|
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
|
||||||
Release: 6%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: The Low Level Virtual Machine
|
Summary: The Low Level Virtual Machine
|
||||||
|
|
||||||
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
||||||
URL: http://llvm.org
|
URL: http://llvm.org
|
||||||
|
%if %{with snapshot_build}
|
||||||
|
Source0: %{llvm_snapshot_source_prefix}llvm-%{llvm_snapshot_yyyymmdd}.src.tar.xz
|
||||||
|
Source2: %{llvm_snapshot_source_prefix}cmake-%{llvm_snapshot_yyyymmdd}.src.tar.xz
|
||||||
|
Source4: %{llvm_snapshot_source_prefix}third-party-%{llvm_snapshot_yyyymmdd}.src.tar.xz
|
||||||
|
%{llvm_snapshot_extra_source_tags}
|
||||||
|
%else
|
||||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz
|
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz
|
||||||
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz.sig
|
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz.sig
|
||||||
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
|
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
|
||||||
|
@ -88,19 +109,9 @@ Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ve
|
||||||
Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{third_party_srcdir}.tar.xz.sig
|
Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{third_party_srcdir}.tar.xz.sig
|
||||||
Source6: release-keys.asc
|
Source6: release-keys.asc
|
||||||
|
|
||||||
# Backported from LLVM 17
|
|
||||||
Patch1: 0001-SystemZ-Improve-error-messages-for-unsupported-reloc.patch
|
|
||||||
# See https://reviews.llvm.org/D137890 for the next two patches
|
|
||||||
Patch2: 0001-llvm-Add-install-targets-for-gtest.patch
|
|
||||||
# Backport of https://reviews.llvm.org/D154212 from LLVM 17.
|
|
||||||
Patch3: 0001-cmake-Add-LLVM_UNITTEST_LINK_FLAGS-option.patch
|
|
||||||
# Backport of https://reviews.llvm.org/D156379 from LLVM 18.
|
|
||||||
Patch4: D156379.diff
|
|
||||||
|
|
||||||
# RHEL-specific patch to avoid unwanted recommonmark dep
|
# RHEL-specific patch to avoid unwanted recommonmark dep
|
||||||
Patch101: 0101-Deactivate-markdown-doc.patch
|
Patch101: 0101-Deactivate-markdown-doc.patch
|
||||||
# Patching third-party dir with a 200 offset in patch number
|
%endif
|
||||||
Patch201: 0201-third-party-Add-install-targets-for-gtest.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
@ -151,14 +162,15 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
# app that requires the libLLVMLineEditor, so we need to make sure
|
# app that requires the libLLVMLineEditor, so we need to make sure
|
||||||
# libedit-devel is available.
|
# libedit-devel is available.
|
||||||
Requires: libedit-devel
|
Requires: libedit-devel
|
||||||
# The installed cmake files reference binaries from llvm-test and llvm-static.
|
# The installed cmake files reference binaries from llvm-test, llvm-static, and
|
||||||
# We tried in the past to split the cmake exports for these binaries out into
|
# llvm-gtest. We tried in the past to split the cmake exports for these binaries
|
||||||
# separate files, so that llvm-devel would not need to Require these packages,
|
# 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
|
# but this caused bugs (rhbz#1773678) and forced us to carry two non-upstream
|
||||||
# patches.
|
# patches.
|
||||||
Requires: %{name}-static%{?_isa} = %{version}-%{release}
|
Requires: %{name}-static%{?_isa} = %{version}-%{release}
|
||||||
%if %{without compat_build}
|
%if %{without compat_build}
|
||||||
Requires: %{name}-test%{?_isa} = %{version}-%{release}
|
Requires: %{name}-test%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: %{name}-googletest%{?_isa} = %{version}-%{release}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -222,16 +234,17 @@ LLVM's modified googletest sources.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
%if %{without snapshot_build}
|
||||||
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
||||||
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE3}' --data='%{SOURCE2}'
|
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE3}' --data='%{SOURCE2}'
|
||||||
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE5}' --data='%{SOURCE4}'
|
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE5}' --data='%{SOURCE4}'
|
||||||
|
%endif
|
||||||
%setup -T -q -b 2 -n %{cmake_srcdir}
|
%setup -T -q -b 2 -n %{cmake_srcdir}
|
||||||
# TODO: It would be more elegant to set -DLLVM_COMMON_CMAKE_UTILS=%{_builddir}/%{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 :(
|
# but this is not a CACHED variable, so we can't actually set it externally :(
|
||||||
cd ..
|
cd ..
|
||||||
mv %{cmake_srcdir} cmake
|
mv %{cmake_srcdir} cmake
|
||||||
%setup -T -q -b 4 -n %{third_party_srcdir}
|
%setup -T -q -b 4 -n %{third_party_srcdir}
|
||||||
%autopatch -m200 -p2
|
|
||||||
cd ..
|
cd ..
|
||||||
mv %{third_party_srcdir} third-party
|
mv %{third_party_srcdir} third-party
|
||||||
|
|
||||||
|
@ -245,6 +258,11 @@ mv %{third_party_srcdir} third-party
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
# Disable LTO to speed up builds
|
||||||
|
%if %{with snapshot_build}
|
||||||
|
%global _lto_cflags %nil
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifarch s390 s390x %{arm} %ix86
|
%ifarch s390 s390x %{arm} %ix86
|
||||||
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
||||||
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
||||||
|
@ -313,8 +331,12 @@ export ASMFLAGS="%{build_cflags}"
|
||||||
-DLLVM_ENABLE_SPHINX:BOOL=ON \
|
-DLLVM_ENABLE_SPHINX:BOOL=ON \
|
||||||
-DLLVM_ENABLE_DOXYGEN:BOOL=OFF \
|
-DLLVM_ENABLE_DOXYGEN:BOOL=OFF \
|
||||||
\
|
\
|
||||||
|
%if %{with snapshot_build}
|
||||||
|
-DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \
|
||||||
|
%else
|
||||||
%if %{without compat_build}
|
%if %{without compat_build}
|
||||||
-DLLVM_VERSION_SUFFIX='' \
|
-DLLVM_VERSION_SUFFIX='' \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
-DLLVM_UNREACHABLE_OPTIMIZE:BOOL=OFF \
|
-DLLVM_UNREACHABLE_OPTIMIZE:BOOL=OFF \
|
||||||
-DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
|
-DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
|
||||||
|
@ -495,7 +517,7 @@ fi
|
||||||
|
|
||||||
%files libs
|
%files libs
|
||||||
%license LICENSE.TXT
|
%license LICENSE.TXT
|
||||||
%{install_libdir}/libLLVM-%{maj_ver}.so
|
%{install_libdir}/libLLVM-%{maj_ver}%{?llvm_snapshot_version_suffix:%{llvm_snapshot_version_suffix}}.so
|
||||||
%if %{without compat_build}
|
%if %{without compat_build}
|
||||||
%if %{with gold}
|
%if %{with gold}
|
||||||
%{_libdir}/LLVMgold.so
|
%{_libdir}/LLVMgold.so
|
||||||
|
@ -575,6 +597,11 @@ fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
%{?llvm_snapshot_changelog_entry}
|
||||||
|
|
||||||
|
* Mon Jul 31 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc1-1
|
||||||
|
- Update to LLVM 17.0.0 RC1
|
||||||
|
|
||||||
* Mon Jul 31 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.6-6
|
* Mon Jul 31 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.6-6
|
||||||
- Fix rhbz #2224885
|
- Fix rhbz #2224885
|
||||||
|
|
||||||
|
|
12
sources
12
sources
|
@ -1,6 +1,6 @@
|
||||||
SHA512 (llvm-16.0.6.src.tar.xz) = 8d4cdadc9a1ad249fbf9248c8e56f3bcafab73a473a0b0ca73499ed8825c62e27668aac4f1d03341631e5ad93701621e834e9e196ca32eac3ef805cf1c860083
|
SHA512 (cmake-17.0.0rc1.src.tar.xz) = 765113906032571abddefb4173606c80f88d564fec54e45ff76967783658cf98b2a5c40ab351dec85f91ebc346768ebcf3922afd0e25178a402a36096c8220fa
|
||||||
SHA512 (llvm-16.0.6.src.tar.xz.sig) = 9adda28085f4a2e2a64dab1d8e4ff23c5629bbb0bb6b34afc081e44f6f85ac4f3c6cd0c3488af98c0fad939c33f9d2a8a0cbef67a577cd7fe3013bc2200452b1
|
SHA512 (cmake-17.0.0rc1.src.tar.xz.sig) = 50c4600e4e686e752d65d60a75133b0058895ee6c9fa62187269f321f9f8feef207412f5e4099eb7da0ae9c90b3f13c81a01c59fd90b2bbca83174b787fd9b84
|
||||||
SHA512 (cmake-16.0.6.src.tar.xz) = 52ecd941d2d85a5b668caa5d0d40480cb6a97b3bf1174e634c2a93e9ef6d03670ca7e96abb0a60cb33ba537b93d5788754dab1f2f45c1f623f788162717d088b
|
SHA512 (llvm-17.0.0rc1.src.tar.xz) = cb1d10a4ccf00a9b1a9a19a6ff42cf4dad832abbf7ea4e2624018c4372d62cb0b851841be02f9abab308bcaefc1d07f0512956cd752bf91d4ac79b6d1d1d37ba
|
||||||
SHA512 (cmake-16.0.6.src.tar.xz.sig) = d20c5e51315aa476775e6ce886684b9f882ce283fc40aa6c1b8f03964c77a1e745e2e1fb00b3488dddfe1a04378e2bfd090350de28e58088525a5305ecb1bea6
|
SHA512 (llvm-17.0.0rc1.src.tar.xz.sig) = 73e3a361685cb7b097a4191dc55839180db8c27f939cadd1b46fa7fb4762543867cfc170ad9042e49b4160c2a6660f0e06f8311151e45100906b28838a7ba8cc
|
||||||
SHA512 (third-party-16.0.6.src.tar.xz) = 51683e92953eb57ed36ebc8a43cb688863edf4f24ba71965d57016cfdc17bad10f8f3942e9597a729329f89489597e79bb4653445ff1ec36ec03077adb1dd7b9
|
SHA512 (third-party-17.0.0rc1.src.tar.xz) = 740923fd1691a2f210d632896f20db6904573ab383396edae22ac238a792a73f031989a71fbfe3f46930c4fbca023133833a7d04dcbba217d9983b239ea49705
|
||||||
SHA512 (third-party-16.0.6.src.tar.xz.sig) = aefb22ee35b2299e77669d72557079630fba5df2c0031c72a025082de3c4ca56ea0e1ec870c42d9056752195ad0e5b68258b548caf801ef4269e2ec1cd9da513
|
SHA512 (third-party-17.0.0rc1.src.tar.xz.sig) = d319cdbac76f069ae41400b0320144e7a4289ae843cd63252c18d14e35e1f7f9b23169d6a2f4fbb7fae81fd0dabd32370c61bfa07742cf90a6571da443feb3cf
|
||||||
|
|
Loading…
Reference in a new issue