import CS llvm-17.0.6-2.module_el8+895+5524c78c

This commit is contained in:
eabdullin 2024-03-28 13:49:19 +00:00
parent 806373a1b2
commit 4c25717992
12 changed files with 254 additions and 546 deletions

12
.gitignore vendored
View File

@ -1,6 +1,6 @@
SOURCES/cmake-16.0.6.src.tar.xz
SOURCES/cmake-16.0.6.src.tar.xz.sig
SOURCES/llvm-16.0.6.src.tar.xz
SOURCES/llvm-16.0.6.src.tar.xz.sig
SOURCES/third-party-16.0.6.src.tar.xz
SOURCES/third-party-16.0.6.src.tar.xz.sig
SOURCES/cmake-17.0.6.src.tar.xz
SOURCES/cmake-17.0.6.src.tar.xz.sig
SOURCES/llvm-17.0.6.src.tar.xz
SOURCES/llvm-17.0.6.src.tar.xz.sig
SOURCES/third-party-17.0.6.src.tar.xz
SOURCES/third-party-17.0.6.src.tar.xz.sig

View File

@ -1,6 +1,6 @@
0de534cfef38697e115c3ae80634765f05e78e5b SOURCES/cmake-16.0.6.src.tar.xz
2db5c88fe9277bb0fa85f49b58e946e49ff235c2 SOURCES/cmake-16.0.6.src.tar.xz.sig
072d2fb4b10f95d06189de00eb7f7e9b35c54e9a SOURCES/llvm-16.0.6.src.tar.xz
bfc74b3868c69ce674a583c91e938b6d4cf0fded SOURCES/llvm-16.0.6.src.tar.xz.sig
5b1a58de6ed9d154a38edb6386a5749576e0b96a SOURCES/third-party-16.0.6.src.tar.xz
51ad6a8ccc5ccd40faff6f1c98a2f33a9b600f88 SOURCES/third-party-16.0.6.src.tar.xz.sig
4b397344260c934e687be7efa0f8456a9dd46f44 SOURCES/cmake-17.0.6.src.tar.xz
fa31d348b6780478403484e22139d25f403503d4 SOURCES/cmake-17.0.6.src.tar.xz.sig
860a3605f08a0a56a8de4e073e26a259871623a6 SOURCES/llvm-17.0.6.src.tar.xz
2ad479ab00a6d5e61ecb953997cfeef6650a687a SOURCES/llvm-17.0.6.src.tar.xz.sig
a35dc22cd3d983a556f6e4a63c8dac6a84e01caf SOURCES/third-party-17.0.6.src.tar.xz
12128cdab7414aeedd573c61cbc2fa82e75491db SOURCES/third-party-17.0.6.src.tar.xz.sig

View File

@ -1,25 +0,0 @@
diff -Naur a/llvm/docs/conf.py b/llvm/docs/conf.py
--- a/llvm/docs/conf.py 2020-09-15 09:12:24.318287611 +0000
+++ b/llvm/docs/conf.py 2020-09-15 15:01:00.025893199 +0000
@@ -36,20 +36,7 @@
'.rst': 'restructuredtext',
}
-try:
- import recommonmark
-except ImportError:
- # manpages do not use any .md sources
- if not tags.has('builder-man'):
- raise
-else:
- import sphinx
- if sphinx.version_info >= (3, 0):
- # This requires 0.5 or later.
- extensions.append('recommonmark')
- else:
- source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'}
- source_suffix['.md'] = 'markdown'
+import sphinx
# The encoding of source files.
#source_encoding = 'utf-8-sig'

View File

@ -0,0 +1,74 @@
From 9d1f05a7b8537deb5f626cd1b7b26ef2678f4c8e Mon Sep 17 00:00:00 2001
From: Arthur Eubanks <aeubanks@google.com>
Date: Thu, 27 Jul 2023 13:27:58 -0700
Subject: [PATCH] [PEI] Don't zero out noreg operands
A tail call may have $noreg operands.
Fixes a crash.
Reviewed By: xgupta
Differential Revision: https://reviews.llvm.org/D156485
(cherry picked from commit f800c1f3b207e7bcdc8b4c7192928d9a078242a0)
---
llvm/lib/CodeGen/PrologEpilogInserter.cpp | 9 +++++++--
llvm/test/CodeGen/X86/zero-call-used-regs.ll | 14 ++++++++++++++
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index e323aaaeefaf..49047719fdaa 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
@@ -1285,6 +1285,8 @@ void PEI::insertZeroCallUsedRegs(MachineFunction &MF) {
continue;
MCRegister Reg = MO.getReg();
+ if (!Reg)
+ continue;
// This picks up sibling registers (e.q. %al -> %ah).
for (MCRegUnit Unit : TRI.regunits(Reg))
@@ -1308,8 +1310,11 @@ void PEI::insertZeroCallUsedRegs(MachineFunction &MF) {
if (!MO.isReg())
continue;
- for (const MCPhysReg &Reg :
- TRI.sub_and_superregs_inclusive(MO.getReg()))
+ MCRegister Reg = MO.getReg();
+ if (!Reg)
+ continue;
+
+ for (const MCPhysReg Reg : TRI.sub_and_superregs_inclusive(Reg))
RegsToZero.reset(Reg);
}
}
diff --git a/llvm/test/CodeGen/X86/zero-call-used-regs.ll b/llvm/test/CodeGen/X86/zero-call-used-regs.ll
index 63d51c916bb9..97ad5ce9c8cb 100644
--- a/llvm/test/CodeGen/X86/zero-call-used-regs.ll
+++ b/llvm/test/CodeGen/X86/zero-call-used-regs.ll
@@ -241,6 +241,20 @@ entry:
ret i32 %x
}
+define dso_local void @tailcall(ptr %p) local_unnamed_addr #0 "zero-call-used-regs"="used-gpr" {
+; I386-LABEL: tailcall:
+; I386: # %bb.0:
+; I386-NEXT: movl {{[0-9]+}}(%esp), %eax
+; I386-NEXT: jmpl *(%eax) # TAILCALL
+;
+; X86-64-LABEL: tailcall:
+; X86-64: # %bb.0:
+; X86-64-NEXT: jmpq *(%rdi) # TAILCALL
+ %c = load ptr, ptr %p
+ tail call void %c()
+ ret void
+}
+
; Don't emit zeroing registers in "main" function.
define dso_local i32 @main() local_unnamed_addr #1 {
; I386-LABEL: main:
--
2.43.0

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,26 @@
diff -Naur a/llvm/docs/conf.py b/llvm/docs/conf.py
--- a/llvm/docs/conf.py 2020-09-15 09:12:24.318287611 +0000
+++ b/llvm/docs/conf.py 2020-09-15 15:01:00.025893199 +0000
@@ -36,21 +36,7 @@
".rst": "restructuredtext",
}
-try:
- import recommonmark
-except ImportError:
- # manpages do not use any .md sources
- if not tags.has("builder-man"):
- raise
-else:
- import sphinx
-
- if sphinx.version_info >= (3, 0):
- # This requires 0.5 or later.
- extensions.append("recommonmark")
- else:
- source_parsers = {".md": "recommonmark.parser.CommonMarkParser"}
- source_suffix[".md"] = "markdown"
+import sphinx
# The encoding of source files.
# source_encoding = 'utf-8-sig'

View File

@ -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

View File

@ -1,46 +0,0 @@
diff --git a/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp b/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
--- a/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
@@ -1152,6 +1152,11 @@
}
}
+ // Type legalization (via getNumberOfParts) can't handle structs
+ if (TLI->getValueType(DL, Src, true) == MVT::Other)
+ return BaseT::getMemoryOpCost(Opcode, Src, Alignment, AddressSpace,
+ CostKind);
+
unsigned NumOps =
(Src->isVectorTy() ? getNumVectorRegs(Src) : getNumberOfParts(Src));
diff --git a/llvm/test/Analysis/CostModel/SystemZ/struct-cost-crash.ll b/llvm/test/Analysis/CostModel/SystemZ/struct-cost-crash.ll
new file mode 100644
--- /dev/null
+++ b/llvm/test/Analysis/CostModel/SystemZ/struct-cost-crash.ll
@@ -0,0 +1,25 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 2
+; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output < %s | FileCheck %s
+;
+; Check that SystemZTTIImpl::getMemoryOpCost doesn't try to legalize structs,
+; which was failing llvm_unreachable in MVT::getVT.
+
+target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
+target triple = "s390x-unknown-linux-gnu"
+
+declare { i64, i32 } @bar()
+
+define i8 @foo() {
+; CHECK-LABEL: 'foo'
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %1
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call { i64, i32 } @bar()
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store { i64, i32 } %2, ptr inttoptr (i64 16 to ptr), align 16
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %1
+;
+ br label %1
+
+1: ; preds = %1, %0
+ %2 = call { i64, i32 } @bar()
+ store { i64, i32 } %2, ptr inttoptr (i64 16 to ptr), align 16
+ br label %1
+}

View File

@ -1,17 +0,0 @@
config.llvm_tools_dir = '/usr/bin'
config.llvm_shlib_dir = '%(llvm_shlib_dir)s' % lit_config.params
if hasattr(config, 'host_triple'):
# This means we are running lit regression tests
# Regression tests write output to this directory, so we need to be able to specify
# a temp directory when invoking lit. e.g. lit -Dllvm_obj_root=/tmp/lit
config.llvm_obj_root = "%(llvm_obj_root)s" % lit_config.params
lit_config.load_config(config, '%(llvm_test_root)s/lit.cfg.py' % lit_config.params)
else:
# This means we are running lit unit tests
# For unit tests, llvm_obj_root is used to find the unit test binaries.
config.llvm_obj_root = '%(llvm_unittest_bindir)s' % lit_config.params
lit_config.load_config(config, '%(llvm_test_root)s/Unit/lit.cfg.py' % lit_config.params)

View File

@ -1,59 +0,0 @@
#!/bin/bash
usage() {
echo "usage: `basename $0` [OPTIONS]"
echo " --threads NUM The number of threads to use for running tests."
echo " --multilib-arch ARCH Use this option to test 32-bit libs/binaries on"
echo " 64-bit hosts."
}
threads_arg=''
while [ $# -gt 0 ]; do
case $1 in
--threads)
shift
threads_arg="--threads $1"
;;
--multilib-arch)
shift
ARCH=$1
;;
* )
echo "unknown option: $1"
echo ""
usage
exit 1
;;
esac
shift
done
set -xe
if [ -z "$ARCH" ]; then
ARCH=`rpm --eval '%_arch'`
fi
case $ARCH in
arm)
;&
i686)
LIB_DIR="/usr/lib/"
;;
*)
LIB_DIR="/usr/lib64/"
;;
esac
cd $(mktemp -d)
ln -s /usr/include include
tar -xzf /usr/share/llvm/src/test.tar.gz
ln -s /usr/share/llvm/src/$ARCH.site.cfg.py test/lit.site.cfg.py
ln -s /usr/share/llvm/src/$ARCH.Unit.site.cfg.py test/Unit/lit.site.cfg.py
ln -s /usr/share/llvm/src/docs docs
lit -v $threads_arg test \
-Dllvm_obj_root=`pwd` \
-Dllvm_test_root=`pwd`/test \
-Dllvm_unittest_bindir=$LIB_DIR/llvm \
-Dllvm_shlib_dir=$LIB_DIR

View File

@ -1,9 +1,20 @@
%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.
# See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_macros
%global toolchain clang
# Opt out of https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer
# https://bugzilla.redhat.com/show_bug.cgi?id=2158587
%undefine _include_frame_pointers
# Components enabled if supported by target architecture:
%define gold_arches %{ix86} x86_64 %{arm} aarch64 %{power64} s390x
%define gold_arches %{ix86} x86_64 aarch64 %{power64} s390x
%ifarch %{gold_arches}
%bcond_without gold
%else
@ -13,14 +24,28 @@
%bcond_with compat_build
%bcond_without check
#global rc_ver 4
%global maj_ver 16
%ifarch %ix86
# Disable LTO on x86 in order to reduce memory consumption
%bcond_with lto_build
%else
%bcond_without lto_build
%endif
%global maj_ver 17
%global min_ver 0
%global patch_ver 6
#global rc_ver 4
%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 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 _lto_cflags -flto=thin
%if %{with compat_build}
%global pkg_name llvm%{maj_ver}
@ -30,15 +55,15 @@
%global install_includedir %{install_prefix}/include
%global install_libdir %{install_prefix}/lib
%global pkg_bindir %{install_bindir}
%global pkg_includedir %{_includedir}/%{name}
%global pkg_libdir %{install_libdir}
%global pkg_datadir %{install_prefix}/share
%else
%global pkg_name llvm
%global install_prefix /usr
%global install_bindir %{_bindir}
%global install_libdir %{_libdir}
%global pkg_bindir %{_bindir}
%global pkg_libdir %{install_libdir}
%global install_includedir %{_includedir}
%global pkg_datadir %{_datadir}
%global exec_suffix %{nil}
%endif
@ -56,12 +81,13 @@
%global _dwz_low_mem_die_limit_s390x 1
%global _dwz_max_die_limit_s390x 1000000
%global llvm_triple %{_target_platform}
# https://fedoraproject.org/wiki/Changes/PythonSafePath#Opting_out
# Don't add -P to Python shebangs
# The executable Python scripts in /usr/share/opt-viewer/ import each other
%undefine _py3_shebang_P
%global llvm_triple %{_host}
################################################################################
# OS Specific Configuration
################################################################################
@ -70,8 +96,6 @@
# RHEL #
########
%if 0%{?rhel}
%global targets_to_build "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly"
%global experimental_targets_to_build ""
%global _smp_mflags -j8
%if 0%{?rhel} == 8
@ -85,13 +109,6 @@
%if 0%{?rhel} > 8
%global use_libedit 1
%endif
%else
##########
# FEDORA #
##########
%global targets_to_build "all"
%global experimental_targets_to_build "AVR"
%endif
################################################################################
@ -100,12 +117,18 @@
Name: %{pkg_name}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
Release: 3%{?dist}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
Release: 2%{?dist}
Summary: The Low Level Virtual Machine
License: Apache-2.0 WITH LLVM-exception OR NCSA
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
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
@ -113,23 +136,13 @@ Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ve
Source4: 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
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
%if %{without compat_build}
Source7: run-lit-tests
Source8: lit.fedora.cfg.py
%endif
# RHEL-specific patches.
Patch101: 0001-Deactivate-markdown-doc.patch
# 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/D156379 from LLVM 18.
Patch3: D156379.diff
# Backport of https://reviews.llvm.org/D156485 for RHEL-23865.
Patch0: 0001-PEI-Don-t-zero-out-noreg-operands.patch
# Patching third-party dir with a 200 offset in patch number
Patch201: 0201-third-party-Add-install-targets-for-gtest.patch
# RHEL-specific patch to avoid unwanted recommonmark dep
Patch101: 0101-Deactivate-markdown-doc.patch
BuildRequires: gcc
BuildRequires: gcc-c++
@ -141,6 +154,9 @@ BuildRequires: libffi-devel
BuildRequires: ncurses-devel
BuildRequires: python3-psutil
BuildRequires: python3-sphinx
%if %{undefined rhel}
BuildRequires: python3-recommonmark
%endif
BuildRequires: multilib-rpm-config
%if %{with gold}
BuildRequires: binutils-devel
@ -155,9 +171,6 @@ BuildRequires: libedit-devel
%endif
# Need pandoc to cover markdown to rst, because RHEL does not have recommonmark,
# so we can't build the documentation as is.
%if !0%{?rhel}
BuildRequires: python3-recommonmark
%endif
%if 0%{?rhel} == 8
# RHEL8 has pandoc which we can use instead of python3-recommonmark for some things.
BuildRequires: pandoc
@ -190,14 +203,15 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%if 0%{?use_libedit}
Requires: libedit-devel
%endif
# 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,
# The installed cmake files reference binaries from llvm-test, llvm-static, and
# llvm-gtest. 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: %{name}-static%{?_isa} = %{version}-%{release}
%if %{without compat_build}
Requires: %{name}-test%{?_isa} = %{version}-%{release}
Requires: %{name}-googletest%{?_isa} = %{version}-%{release}
%endif
@ -233,6 +247,13 @@ Provides: llvm-static(major) = %{maj_ver}
%description static
Static libraries for the LLVM compiler infrastructure.
%package cmake-utils
Summary: CMake utilities shared across LLVM subprojects
%description cmake-utils
CMake utilities shared across LLVM subprojects.
This is for internal use by LLVM packages only.
%if %{without compat_build}
%package test
@ -247,6 +268,8 @@ LLVM regression tests.
%package googletest
Summary: LLVM's modified googletest sources
# libllvm_gtest.a moved from llvm-static to llvm-googletest
Conflicts: %{name}-static < 17.0.0
%description googletest
LLVM's modified googletest sources.
@ -268,21 +291,22 @@ This is the main package for llvm-toolset.
%endif
%prep
%if %{without snapshot_build}
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE3}' --data='%{SOURCE2}'
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE5}' --data='%{SOURCE4}'
%endif
%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
%setup -T -q -b 4 -n %{third_party_srcdir}
%autopatch -m200 -p2
cd ..
mv %{third_party_srcdir} third-party
%setup -T -q -b 0 -n %{llvm_srcdir}
%autopatch -M200 -p2
%autopatch -M%{?!rhel:100}%{?rhel:200} -p2
%py3_shebang_fix \
test/BugPoint/compile-custom.ll.py \
@ -297,28 +321,26 @@ find -name '*.md' | while read md; do sed -r -e 's/^( )*\* /\n\1\* /' ${md} | pa
%build
%ifarch s390 s390x
# Fails with "exceeded PCRE's backtracking limit"
%if %{without lto_build}
%global _lto_cflags %nil
%else
%global _lto_cflags -flto=thin
%endif
%ifarch s390 s390x %{arm} %ix86
%ifarch s390 s390x %ix86
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
export ASMFLAGS=$CFLAGS
export ASMFLAGS="%{build_cflags}"
# force off shared libs as cmake macros turns it on.
# TODO: Disable LLVM_UNREACHABLE_OPTIMIZE.
%cmake -G Ninja \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DLLVM_PARALLEL_LINK_JOBS=1 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_SKIP_RPATH:BOOL=ON \
%ifarch s390 %{arm} %ix86
%ifarch s390 %ix86
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
%endif
@ -348,7 +370,11 @@ export ASMFLAGS=$CFLAGS
\
-DLLVM_INCLUDE_TESTS:BOOL=ON \
-DLLVM_BUILD_TESTS:BOOL=ON \
%if %{with compat_build}
-DLLVM_INSTALL_GTEST:BOOL=OFF \
%else
-DLLVM_INSTALL_GTEST:BOOL=ON \
%endif
-DLLVM_LIT_ARGS=-v \
\
-DLLVM_INCLUDE_EXAMPLES:BOOL=ON \
@ -368,10 +394,12 @@ export ASMFLAGS=$CFLAGS
-DLLVM_ENABLE_SPHINX:BOOL=ON \
-DLLVM_ENABLE_DOXYGEN:BOOL=OFF \
\
%if %{without compat_build}
%if %{with snapshot_build}
-DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \
%else
-DLLVM_VERSION_SUFFIX='' \
%endif
-DLLVM_UNREACHABLE_OPTIMIZE:BOOL=OFF \
-DLLVM_UNREACHABLE_OPTIMIZE:BOOL=ON \
-DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
-DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON \
@ -381,7 +409,11 @@ export ASMFLAGS=$CFLAGS
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
-DLLVM_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html \
-DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3 \
-DLLVM_INCLUDE_BENCHMARKS=OFF
-DLLVM_INCLUDE_BENCHMARKS=OFF \
%if %{with lto_build}
-DLLVM_UNITTEST_LINK_FLAGS="-Wl,-plugin-opt=O0" \
%endif
-DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -Wl,-z,cet-report=error"
# Build libLLVM.so first. This ensures that when libLLVM.so is linking, there
# are no other compile jobs running. This will help reduce OOM errors on the
@ -413,26 +445,11 @@ rm -rf test/tools/UpdateTestChecks
%multilib_fix_c_header --file %{_includedir}/llvm/Config/llvm-config.h
# Install libraries needed for unittests
%if 0%{?__isa_bits} == 64
%global build_libdir %{_vpath_builddir}/lib64
%else
%global build_libdir %{_vpath_builddir}/lib
%endif
%global build_libdir %{_vpath_builddir}/%{_lib}
install %{build_libdir}/libLLVMTestingSupport.a %{buildroot}%{_libdir}
install %{build_libdir}/libLLVMTestingAnnotations.a %{buildroot}%{_libdir}
%global install_srcdir %{buildroot}%{_datadir}/llvm/src
# Install gtest sources so clang can use them for gtest
install -d %{install_srcdir}
install -d %{install_srcdir}/utils/
cp -R ../third-party/unittest %{install_srcdir}/utils/
# Clang needs these for running lit tests.
cp utils/update_cc_test_checks.py %{install_srcdir}/utils/
cp -R utils/UpdateTestChecks %{install_srcdir}/utils/
%if %{with gold}
# Add symlink to lto plugin in the binutils plugin directory.
%{__mkdir_p} %{buildroot}%{_libdir}/bfd-plugins/
@ -456,9 +473,9 @@ ln -s ../../../%{install_includedir}/llvm-c %{buildroot}/%{pkg_includedir}/llvm-
%multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h
# Create ld.so.conf.d entry
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf << EOF
%{pkg_libdir}
mkdir -p %{buildroot}/etc/ld.so.conf.d
cat >> %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf << EOF
%{install_libdir}
EOF
# Add version suffix to man pages and move them to mandir.
@ -480,63 +497,51 @@ rm -Rf %{build_install_prefix}/share/opt-viewer
%if %{without compat_build}
mv %{buildroot}/%{pkg_bindir}/llvm-config %{buildroot}/%{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
mv %{buildroot}/%{install_bindir}/llvm-config %{buildroot}/%{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
# We still maintain a versionned symlink for consistency across llvm versions.
# This is specific to the non-compat build and matches the exec prefix for
# compat builds. An isa-agnostic versionned symlink is also maintained in the (un)install
# steps.
(cd %{buildroot}/%{pkg_bindir} ; ln -s llvm-config%{exec_suffix}-%{__isa_bits} llvm-config-%{maj_ver}-%{__isa_bits} )
(cd %{buildroot}/%{install_bindir} ; ln -s llvm-config%{exec_suffix}-%{__isa_bits} llvm-config-%{maj_ver}-%{__isa_bits} )
# ghost presence
touch %{buildroot}%{_bindir}/llvm-config-%{maj_ver}
%else
rm %{buildroot}%{_bindir}/llvm-config%{exec_suffix}
(cd %{buildroot}/%{pkg_bindir} ; ln -s llvm-config llvm-config%{exec_suffix}-%{__isa_bits} )
(cd %{buildroot}/%{install_bindir} ; ln -s llvm-config llvm-config%{exec_suffix}-%{__isa_bits} )
%endif
# ghost presence
touch %{buildroot}%{_bindir}/llvm-config%{exec_suffix}
%if %{without compat_build}
cp -Rv ../cmake/Modules/* %{buildroot}%{pkg_libdir}/cmake/llvm
%endif
mkdir -p %{buildroot}%{pkg_datadir}/llvm/cmake
cp -Rv ../cmake/* %{buildroot}%{pkg_datadir}/llvm/cmake
%check
# Disable check section on arm due to some kind of memory related failure.
# Possibly related to https://bugzilla.redhat.com/show_bug.cgi?id=1920183
%ifnarch %{arm}
# TODO: Fix the failures below
%ifarch %{arm}
rm test/tools/llvm-readobj/ELF/dependent-libraries.test
%endif
# non reproducible errors
rm test/tools/dsymutil/X86/swift-interface.test
%if %{with check}
# FIXME: use %%cmake_build instead of %%__ninja
LD_LIBRARY_PATH=%{buildroot}/%{pkg_libdir} %{__ninja} check-all -C %{_vpath_builddir}
%endif
LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C %{_vpath_builddir}
%endif
%ldconfig_scriptlets libs
%post devel
%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits}
%{_sbindir}/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} %{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits}
%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits}
%endif
%postun devel
if [ $1 -eq 0 ]; then
%{_sbindir}/update-alternatives --remove llvm-config%{exec_suffix} %{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%{_sbindir}/update-alternatives --remove llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%if %{without compat_build}
%{_sbindir}/update-alternatives --remove llvm-config-%{maj_ver} %{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%{_sbindir}/update-alternatives --remove llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%endif
fi
@ -547,11 +552,11 @@ fi
%{_bindir}/*
%exclude %{_bindir}/llvm-config%{exec_suffix}
%exclude %{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%exclude %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%if %{without compat_build}
%exclude %{_bindir}/llvm-config-%{maj_ver}
%exclude %{pkg_bindir}/llvm-config-%{maj_ver}-%{__isa_bits}
%exclude %{install_bindir}/llvm-config-%{maj_ver}-%{__isa_bits}
%exclude %{_bindir}/not
%exclude %{_bindir}/count
%exclude %{_bindir}/yaml-bench
@ -560,12 +565,12 @@ fi
%exclude %{_bindir}/llvm-opt-fuzzer
%{_datadir}/opt-viewer
%else
%{pkg_bindir}
%{install_bindir}
%endif
%files libs
%license LICENSE.TXT
%{pkg_libdir}/libLLVM-%{maj_ver}.so
%{install_libdir}/libLLVM-%{maj_ver}%{?llvm_snapshot_version_suffix:%{llvm_snapshot_version_suffix}}.so
%if %{without compat_build}
%if %{with gold}
%{_libdir}/LLVMgold.so
@ -574,38 +579,34 @@ fi
%{_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so
%{_libdir}/libLTO.so*
%else
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf
%if %{with gold}
%{_libdir}/%{name}/lib/LLVMgold.so
%endif
%{pkg_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so
%{pkg_libdir}/libLTO.so*
%exclude %{pkg_libdir}/libLTO.so
%{install_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so
%{install_libdir}/libLTO.so*
%exclude %{install_libdir}/libLTO.so
%endif
%{pkg_libdir}/libRemarks.so*
%{install_libdir}/libRemarks.so*
%files devel
%license LICENSE.TXT
%ghost %{_bindir}/llvm-config%{exec_suffix}
%{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%{_mandir}/man1/llvm-config*
%if %{without compat_build}
%{_includedir}/llvm
%{_includedir}/llvm-c
%{_libdir}/libLLVM.so
%{_libdir}/cmake/llvm
%{pkg_bindir}/llvm-config-%{maj_ver}-%{__isa_bits}
%ghost %{_bindir}/llvm-config-%{maj_ver}
%else
%{install_includedir}/llvm
%{install_includedir}/llvm-c
%{install_libdir}/libLLVM.so
%{install_libdir}/cmake/llvm
%if %{without compat_build}
%{install_bindir}/llvm-config-%{maj_ver}-%{__isa_bits}
%ghost %{_bindir}/llvm-config-%{maj_ver}
%else
%{pkg_includedir}/llvm
%{pkg_includedir}/llvm-c
%{pkg_libdir}/libLTO.so
%{pkg_libdir}/libLLVM.so
%{pkg_libdir}/cmake/llvm
%{install_libdir}/libLTO.so
%endif
%files doc
@ -614,14 +615,18 @@ fi
%files static
%license LICENSE.TXT
%{install_libdir}/*.a
%if %{without compat_build}
%{_libdir}/*.a
%exclude %{_libdir}/libLLVMTestingSupport.a
%exclude %{_libdir}/libLLVMTestingAnnotations.a
%else
%{_libdir}/%{name}/lib/*.a
%exclude %{install_libdir}/libLLVMTestingSupport.a
%exclude %{install_libdir}/libLLVMTestingAnnotations.a
%exclude %{install_libdir}/libllvm_gtest.a
%exclude %{install_libdir}/libllvm_gtest_main.a
%endif
%files cmake-utils
%license LICENSE.TXT
%{pkg_datadir}/llvm/cmake
%if %{without compat_build}
%files test
@ -635,11 +640,12 @@ fi
%files googletest
%license LICENSE.TXT
%{_datadir}/llvm/src/utils
%{_libdir}/libLLVMTestingSupport.a
%{_libdir}/libLLVMTestingAnnotations.a
%{_includedir}/llvm-gtest
%{_includedir}/llvm-gmock
%{install_libdir}/libLLVMTestingSupport.a
%{install_libdir}/libLLVMTestingAnnotations.a
%{install_libdir}/libllvm_gtest.a
%{install_libdir}/libllvm_gtest_main.a
%{install_includedir}/llvm-gtest
%{install_includedir}/llvm-gmock
%if 0%{?rhel}
%files toolset
@ -649,6 +655,18 @@ fi
%endif
%changelog
* Fri Feb 02 2024 Nikita Popov <npopov@redhat.com> - 17.0.6-2
- Fix crash with -fzero-call-used-regs (RHEL-23865)
* Wed Nov 29 2023 Nikita Popov <npopov@redhat.com> - 17.0.6-1
- Update to LLVM 17.0.6
* Mon Oct 23 2023 Nikita Popov <npopov@redhat.com> - 17.0.2-2
- Add Conflicts to llvm-googletest
* Wed Oct 04 2023 Nikita Popov <npopov@redhat.com> - 17.0.2-1
- Update to LLVM 17.0.2
* Thu Aug 03 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.6-3
- Fix rhbz #2228944