Update to LLVM 21.1.4

Bring all the files from Fedora Rawhide.

Resolves: RHEL-100902
This commit is contained in:
Tulio Magno Quites Machado Filho 2025-10-16 10:48:56 -03:00
parent e78d6b9a5c
commit c552236f5f
24 changed files with 2288 additions and 1602 deletions

63
.gitignore vendored
View File

@ -1,48 +1,15 @@
SOURCES/cmake-15.0.7.src.tar.xz
SOURCES/llvm-15.0.7.src.tar.xz
/cmake-15.0.7.src.tar.xz
/llvm-15.0.7.src.tar.xz
/llvm-16.0.0.src.tar.xz
/llvm-16.0.0.src.tar.xz.sig
/cmake-16.0.0.src.tar.xz
/cmake-16.0.0.src.tar.xz.sig
/third-party-16.0.0.src.tar.xz
/third-party-16.0.0.src.tar.xz.sig
/llvm-16.0.6.src.tar.xz
/llvm-16.0.6.src.tar.xz.sig
/cmake-16.0.6.src.tar.xz
/cmake-16.0.6.src.tar.xz.sig
/third-party-16.0.6.src.tar.xz
/third-party-16.0.6.src.tar.xz.sig
/llvm-17.0.2.src.tar.xz
/llvm-17.0.2.src.tar.xz.sig
/cmake-17.0.2.src.tar.xz
/cmake-17.0.2.src.tar.xz.sig
/third-party-17.0.2.src.tar.xz
/third-party-17.0.2.src.tar.xz.sig
/llvm-17.0.6.src.tar.xz
/llvm-17.0.6.src.tar.xz.sig
/cmake-17.0.6.src.tar.xz
/cmake-17.0.6.src.tar.xz.sig
/third-party-17.0.6.src.tar.xz
/third-party-17.0.6.src.tar.xz.sig
/llvm-18.1.8.src.tar.xz
/llvm-18.1.8.src.tar.xz.sig
/cmake-18.1.8.src.tar.xz
/cmake-18.1.8.src.tar.xz.sig
/third-party-18.1.8.src.tar.xz
/third-party-18.1.8.src.tar.xz.sig
/llvm-project-19.1.3.src.tar.xz
/llvm-project-19.1.3.src.tar.xz.sig
/llvm-project-18.1.8.src.tar.xz
/llvm-project-18.1.8.src.tar.xz.sig
/llvm-project-19.1.7.src.tar.xz
/llvm-project-19.1.7.src.tar.xz.sig
/llvm-project-20.1.3.src.tar.xz
/llvm-project-20.1.3.src.tar.xz.sig
/llvm-project-20.1.6.src.tar.xz
/llvm-project-20.1.6.src.tar.xz.sig
/llvm-project-20.1.7.src.tar.xz
/llvm-project-20.1.7.src.tar.xz.sig
/llvm-project-20.1.8.src.tar.xz
/llvm-project-20.1.8.src.tar.xz.sig
/*.src.rpm
/*.src.tar.xz
/*.src.tar.xz.sig
/*.tar.gz
/cmake/
/llvm-*.src/
/results_llvm/
/third-party/
/llvm-git-revision-*.txt
/llvm-release-*.txt
/BUILD
/BUILDROOT
/out
/version.spec.inc
/.gdbinit

30
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,30 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
- id: fix-byte-order-marker
- id: detect-private-key
- id: check-toml
- id: check-yaml
args:
- "--allow-multiple-documents"
- "--unsafe"
# See https://tmt.readthedocs.io/en/latest/guide.html#checking-data-validity
- repo: https://github.com/teemtee/tmt.git
rev: 1.38.0
hooks:
- id: tmt-lint
exclude: ".*\\.patch"

View File

@ -0,0 +1,59 @@
From daf5077c8ce848b39239879369679c9fea7041b1 Mon Sep 17 00:00:00 2001
From: Konrad Kleine <kkleine@redhat.com>
Date: Tue, 28 Jan 2025 08:34:09 +0000
Subject: [PATCH] shared libs
---
polly/cmake/polly_macros.cmake | 5 ++++-
polly/lib/CMakeLists.txt | 1 +
polly/lib/External/CMakeLists.txt | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/polly/cmake/polly_macros.cmake b/polly/cmake/polly_macros.cmake
index 9bd7b0b0ea59..fc2c3a76901f 100644
--- a/polly/cmake/polly_macros.cmake
+++ b/polly/cmake/polly_macros.cmake
@@ -1,5 +1,5 @@
macro(add_polly_library name)
- cmake_parse_arguments(ARG "" "" "" ${ARGN})
+ cmake_parse_arguments(ARG "SHARED" "" "" ${ARGN})
set(srcs ${ARG_UNPARSED_ARGUMENTS})
if(MSVC_IDE OR XCODE)
file( GLOB_RECURSE headers *.h *.td *.def)
@@ -17,6 +17,9 @@ macro(add_polly_library name)
else()
set(libkind)
endif()
+ if (ARG_SHARED)
+ set(libkind SHARED)
+ endif()
add_library( ${name} ${libkind} ${srcs} )
set_target_properties(${name} PROPERTIES FOLDER "Polly/Libraries")
diff --git a/polly/lib/CMakeLists.txt b/polly/lib/CMakeLists.txt
index 0ed673815ff3..e156dcb31655 100644
--- a/polly/lib/CMakeLists.txt
+++ b/polly/lib/CMakeLists.txt
@@ -41,6 +41,7 @@ set(POLLY_COMPONENTS
# the sources them to be recompiled for each of them.
add_llvm_pass_plugin(Polly
NO_MODULE
+ SHARED
SUBPROJECT Polly
Analysis/DependenceInfo.cpp
Analysis/ScopDetection.cpp
diff --git a/polly/lib/External/CMakeLists.txt b/polly/lib/External/CMakeLists.txt
index ab5cba93cdcf..fdfd06864bc7 100644
--- a/polly/lib/External/CMakeLists.txt
+++ b/polly/lib/External/CMakeLists.txt
@@ -284,6 +284,7 @@ if (POLLY_BUNDLED_ISL)
)
add_polly_library(PollyISL
+ SHARED
${ISL_FILES}
)
--
2.50.1

View File

@ -0,0 +1,48 @@
From 10c38a8830c2c93b490b342596a2d286f4f21ae6 Mon Sep 17 00:00:00 2001
From: Tulio Magno Quites Machado Filho <tuliom@redhat.com>
Date: Wed, 29 Oct 2025 10:59:29 -0300
Subject: [PATCH] [BPF] Revert the behavior when handling traps
Commit ab391beb11f733b526b86f9df23734a34657d876 in LLVM 21 changed the
behavior of the BPF backend when handling traps in order to require
kfunc __bpf_trap. This kfunc is only available on Linux >= 6.16 via
commit f95695f2c46592b4260032736a9bfc6e2a01c77c.
RHEL 8 uses Linux 4.18, which means we can't adopt the new behavior
unless __bpf_trap is backported.
---
llvm/lib/Target/BPF/BPFTargetMachine.cpp | 3 ++-
llvm/test/CodeGen/BPF/BTF/unreachable.ll | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/llvm/lib/Target/BPF/BPFTargetMachine.cpp b/llvm/lib/Target/BPF/BPFTargetMachine.cpp
index ad3df2c879fe..426facc74904 100644
--- a/llvm/lib/Target/BPF/BPFTargetMachine.cpp
+++ b/llvm/lib/Target/BPF/BPFTargetMachine.cpp
@@ -40,7 +40,8 @@ opt<bool> DisableMIPeephole("disable-bpf-peephole", cl::Hidden,
cl::desc("Disable machine peepholes for BPF"));
static cl::opt<bool>
- DisableCheckUnreachable("bpf-disable-trap-unreachable", cl::Hidden,
+ DisableCheckUnreachable("bpf-disable-trap-unreachable", cl::init(true),
+ cl::Hidden,
cl::desc("Disable Trap Unreachable for BPF"));
extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeBPFTarget() {
diff --git a/llvm/test/CodeGen/BPF/BTF/unreachable.ll b/llvm/test/CodeGen/BPF/BTF/unreachable.ll
index 5f53a7445433..91bd94e8dc45 100644
--- a/llvm/test/CodeGen/BPF/BTF/unreachable.ll
+++ b/llvm/test/CodeGen/BPF/BTF/unreachable.ll
@@ -1,7 +1,7 @@
-; RUN: llc -mtriple=bpfel -mcpu=v3 -filetype=obj -o %t1 %s
+; RUN: llc -mtriple=bpfel -mcpu=v3 -filetype=obj -o %t1 -bpf-disable-trap-unreachable=0 %s
; RUN: llvm-objcopy --dump-section='.BTF'=%t2 %t1
; RUN: %python %p/print_btf.py %t2 | FileCheck -check-prefixes=CHECK-BTF %s
-; RUN: llc -mtriple=bpfel -mcpu=v3 < %s | FileCheck -check-prefixes=CHECK %s
+; RUN: llc -mtriple=bpfel -mcpu=v3 -bpf-disable-trap-unreachable=0 < %s | FileCheck -check-prefixes=CHECK %s
define void @foo() {
entry:
--
2.50.1

View File

@ -0,0 +1,131 @@
From dde30a47313bf52fef02bbcb1de931a8d725659f Mon Sep 17 00:00:00 2001
From: Florian Hahn <flo@fhahn.com>
Date: Fri, 6 Jun 2025 12:38:30 +0100
Subject: [PATCH] [CGP] Bail out if (Base|Scaled)Reg does not dominate insert
point. (#142949)
(Base|Scaled)Reg may not dominate the chosen insert point, if there are
multiple uses of the address. Bail out if that's the case, otherwise we
will generate invalid IR.
In some cases, we could probably adjust the insert point or hoist the
(Base|Scaled)Reg.
Fixes https://github.com/llvm/llvm-project/issues/142830.
PR: https://github.com/llvm/llvm-project/pull/142949
---
llvm/lib/CodeGen/CodeGenPrepare.cpp | 13 +++-
.../X86/sink-addrmode-reg-does-not-geps.ll | 76 +++++++++++++++++++
2 files changed, 87 insertions(+), 2 deletions(-)
create mode 100644 llvm/test/Transforms/CodeGenPrepare/X86/sink-addrmode-reg-does-not-geps.ll
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 822ed6283117..32348a899683 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -5945,8 +5945,17 @@ bool CodeGenPrepare::optimizeMemoryInst(Instruction *MemoryInst, Value *Addr,
// The current BB may be optimized multiple times, we can't guarantee the
// reuse of Addr happens later, call findInsertPos to find an appropriate
// insert position.
- IRBuilder<> Builder(MemoryInst->getParent(),
- findInsertPos(Addr, MemoryInst, SunkAddr));
+ auto InsertPos = findInsertPos(Addr, MemoryInst, SunkAddr);
+
+ // TODO: Adjust insert point considering (Base|Scaled)Reg if possible.
+ if (!SunkAddr) {
+ auto &DT = getDT(*MemoryInst->getFunction());
+ if ((AddrMode.BaseReg && !DT.dominates(AddrMode.BaseReg, &*InsertPos)) ||
+ (AddrMode.ScaledReg && !DT.dominates(AddrMode.ScaledReg, &*InsertPos)))
+ return Modified;
+ }
+
+ IRBuilder<> Builder(MemoryInst->getParent(), InsertPos);
if (SunkAddr) {
LLVM_DEBUG(dbgs() << "CGP: Reusing nonlocal addrmode: " << AddrMode
diff --git a/llvm/test/Transforms/CodeGenPrepare/X86/sink-addrmode-reg-does-not-geps.ll b/llvm/test/Transforms/CodeGenPrepare/X86/sink-addrmode-reg-does-not-geps.ll
new file mode 100644
index 000000000000..1640bafbd0bf
--- /dev/null
+++ b/llvm/test/Transforms/CodeGenPrepare/X86/sink-addrmode-reg-does-not-geps.ll
@@ -0,0 +1,76 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt -S -passes='require<profile-summary>,function(codegenprepare)' %s | FileCheck %s
+
+target triple = "x86_64-unknown-linux"
+
+declare i1 @cond(float)
+
+define void @scaled_reg_does_not_dominate_insert_point(ptr %src) {
+; CHECK-LABEL: define void @scaled_reg_does_not_dominate_insert_point(
+; CHECK-SAME: ptr [[SRC:%.*]]) {
+; CHECK-NEXT: [[BB:.*]]:
+; CHECK-NEXT: br label %[[LOOP:.*]]
+; CHECK: [[LOOP]]:
+; CHECK-NEXT: [[IV:%.*]] = phi i64 [ 0, %[[BB]] ], [ [[IV_NEXT:%.*]], %[[LOOP]] ]
+; CHECK-NEXT: [[IV_NEXT]] = add i64 [[IV]], 1
+; CHECK-NEXT: [[SUNKADDR2:%.*]] = mul i64 [[IV_NEXT]], 2
+; CHECK-NEXT: [[SUNKADDR3:%.*]] = getelementptr i8, ptr [[SRC]], i64 [[SUNKADDR2]]
+; CHECK-NEXT: [[SUNKADDR4:%.*]] = getelementptr i8, ptr [[SUNKADDR3]], i64 6
+; CHECK-NEXT: [[L_0:%.*]] = load float, ptr [[SUNKADDR4]], align 4
+; CHECK-NEXT: [[SUNKADDR:%.*]] = mul i64 [[IV]], 2
+; CHECK-NEXT: [[SUNKADDR1:%.*]] = getelementptr i8, ptr [[SRC]], i64 [[SUNKADDR]]
+; CHECK-NEXT: [[L_1:%.*]] = load float, ptr [[SUNKADDR1]], align 4
+; CHECK-NEXT: [[TMP0:%.*]] = call i1 @cond(float [[L_0]])
+; CHECK-NEXT: [[C:%.*]] = call i1 @cond(float [[L_1]])
+; CHECK-NEXT: br i1 [[C]], label %[[LOOP]], label %[[EXIT:.*]]
+; CHECK: [[EXIT]]:
+; CHECK-NEXT: ret void
+;
+bb:
+ %gep.base = getelementptr i8, ptr %src, i64 8
+ br label %loop
+
+loop:
+ %iv = phi i64 [ 0, %bb ], [ %iv.next, %loop ]
+ %iv.shl = shl i64 %iv, 1
+ %gep.shl = getelementptr i8, ptr %gep.base, i64 %iv.shl
+ %gep.sub = getelementptr i8, ptr %gep.shl, i64 -8
+ %iv.next = add i64 %iv, 1
+ %l.0 = load float, ptr %gep.shl, align 4
+ %l.1 = load float, ptr %gep.sub, align 4
+ call i1 @cond(float %l.0)
+ %c = call i1 @cond(float %l.1)
+ br i1 %c, label %loop, label %exit
+
+exit:
+ ret void
+}
+
+define void @check_dt_after_modifying_cfg(ptr %dst, i64 %x, i8 %y, i8 %z) {
+; CHECK-LABEL: define void @check_dt_after_modifying_cfg(
+; CHECK-SAME: ptr [[DST:%.*]], i64 [[X:%.*]], i8 [[Y:%.*]], i8 [[Z:%.*]]) {
+; CHECK-NEXT: [[ENTRY:.*]]:
+; CHECK-NEXT: [[OFFSET:%.*]] = lshr i64 [[X]], 2
+; CHECK-NEXT: [[SEL_FROZEN:%.*]] = freeze i8 [[Z]]
+; CHECK-NEXT: [[CMP:%.*]] = icmp slt i8 [[SEL_FROZEN]], 0
+; CHECK-NEXT: br i1 [[CMP]], label %[[SELECT_END:.*]], label %[[SELECT_FALSE_SINK:.*]]
+; CHECK: [[SELECT_FALSE_SINK]]:
+; CHECK-NEXT: [[SMIN:%.*]] = tail call i8 @llvm.smin.i8(i8 [[Y]], i8 0)
+; CHECK-NEXT: br label %[[SELECT_END]]
+; CHECK: [[SELECT_END]]:
+; CHECK-NEXT: [[SEL:%.*]] = phi i8 [ 0, %[[ENTRY]] ], [ [[SMIN]], %[[SELECT_FALSE_SINK]] ]
+; CHECK-NEXT: [[SUNKADDR:%.*]] = getelementptr i8, ptr [[DST]], i64 [[OFFSET]]
+; CHECK-NEXT: store i8 [[SEL]], ptr [[SUNKADDR]], align 1
+; CHECK-NEXT: ret void
+;
+entry:
+ %offset = lshr i64 %x, 2
+ %gep.dst = getelementptr i8, ptr %dst, i64 %offset
+ %smin = tail call i8 @llvm.smin.i8(i8 %y, i8 0)
+ %cmp = icmp slt i8 %z, 0
+ %sel = select i1 %cmp, i8 0, i8 %smin
+ store i8 %sel, ptr %gep.dst, align 1
+ ret void
+}
+
+declare i8 @llvm.smin.i8(i8, i8) #0
--
2.50.1

View File

@ -1,81 +0,0 @@
From 6d5697f7cb4e933d2f176c46b7ac05a9cbaeb8b6 Mon Sep 17 00:00:00 2001
From: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date: Thu, 23 Jan 2025 19:11:18 +0100
Subject: [PATCH] [SystemZ] Fix ICE with i128->i64 uaddo carry chain
We can only optimize a uaddo_carry via specialized instruction
if the carry was produced by another uaddo(_carry) instruction;
there is already a check for that.
However, i128 uaddo(_carry) use a completely different mechanism;
they indicate carry in a vector register instead of the CC flag.
Thus, we must also check that we don't mix those two - that check
has been missing.
Fixes: https://github.com/llvm/llvm-project/issues/124001
---
.../Target/SystemZ/SystemZISelLowering.cpp | 12 ++++++----
llvm/test/CodeGen/SystemZ/pr124001.ll | 23 +++++++++++++++++++
2 files changed, 31 insertions(+), 4 deletions(-)
create mode 100644 llvm/test/CodeGen/SystemZ/pr124001.ll
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
index 4040ab6d4510..1fb31c26e20d 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -4708,15 +4708,19 @@ SDValue SystemZTargetLowering::lowerXALUO(SDValue Op,
}
static bool isAddCarryChain(SDValue Carry) {
- while (Carry.getOpcode() == ISD::UADDO_CARRY)
+ while (Carry.getOpcode() == ISD::UADDO_CARRY &&
+ Carry->getValueType(0) != MVT::i128)
Carry = Carry.getOperand(2);
- return Carry.getOpcode() == ISD::UADDO;
+ return Carry.getOpcode() == ISD::UADDO &&
+ Carry->getValueType(0) != MVT::i128;
}
static bool isSubBorrowChain(SDValue Carry) {
- while (Carry.getOpcode() == ISD::USUBO_CARRY)
+ while (Carry.getOpcode() == ISD::USUBO_CARRY &&
+ Carry->getValueType(0) != MVT::i128)
Carry = Carry.getOperand(2);
- return Carry.getOpcode() == ISD::USUBO;
+ return Carry.getOpcode() == ISD::USUBO &&
+ Carry->getValueType(0) != MVT::i128;
}
// Lower UADDO_CARRY/USUBO_CARRY nodes.
diff --git a/llvm/test/CodeGen/SystemZ/pr124001.ll b/llvm/test/CodeGen/SystemZ/pr124001.ll
new file mode 100644
index 000000000000..9cf630a55dd6
--- /dev/null
+++ b/llvm/test/CodeGen/SystemZ/pr124001.ll
@@ -0,0 +1,23 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
+
+define i64 @test(i128 %in) {
+; CHECK-LABEL: test:
+; CHECK: # %bb.0:
+; CHECK-NEXT: larl %r1, .LCPI0_0
+; CHECK-NEXT: vl %v0, 0(%r2), 3
+; CHECK-NEXT: vl %v1, 0(%r1), 3
+; CHECK-NEXT: vaccq %v0, %v0, %v1
+; CHECK-NEXT: vlgvg %r1, %v0, 1
+; CHECK-NEXT: la %r2, 1(%r1)
+; CHECK-NEXT: br %r14
+ %1 = tail call { i128, i1 } @llvm.uadd.with.overflow.i128(i128 %in, i128 1)
+ %2 = extractvalue { i128, i1 } %1, 1
+ %3 = zext i1 %2 to i64
+ %4 = add i64 %3, 1
+ ret i64 %4
+}
+
+declare { i128, i1 } @llvm.uadd.with.overflow.i128(i128, i128) #0
+
+attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
--
2.48.1

View File

@ -0,0 +1,27 @@
From f028fc042ef2875a13c6abf3828626a313e4a8e6 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Fri, 1 Aug 2025 15:38:22 +0000
Subject: [PATCH] clang: Add a hack to fix the offload build with the
mtls-dialect option
---
clang/lib/Driver/ToolChains/CommonArgs.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
index 097d186ad8ea..0dc9e60f8428 100644
--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -920,6 +920,9 @@ bool tools::isTLSDESCEnabled(const ToolChain &TC,
} else if (Triple.isX86()) {
SupportedArgument = V == "gnu" || V == "gnu2";
EnableTLSDESC = V == "gnu2";
+ } else if( Triple.isGPU()) {
+ // HACK To fix the offload build.
+ return false;
} else {
Unsupported = true;
}
--
2.49.0

View File

@ -1,51 +0,0 @@
From be7b1ef7c8e58b454e20f7f70d0e316528e2c823 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Tue, 29 Apr 2025 21:35:57 +0000
Subject: [PATCH] [sanitizer_common] Disable termio ioctls on PowerPC
glibc-2.42 removed the termio.h header, but there are refrences to it
still in the kernel's ioctl.h, so we need disable these ioctls to fix
this build.
---
.../sanitizer_platform_limits_posix.cpp | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
index 7a89bf1c7498..7b81951f82ae 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
@@ -182,6 +182,12 @@ typedef struct user_fpregs elf_fpregset_t;
#include <sys/ioctl.h>
#endif
+// Work around struct termio usage in ioctl.h on ppc64le.
+#if SANITIZER_GLIBC && !__has_include(<termio.h>) && defined(__powerpc64__)
+ #define DISABLE_TERMIO_IOCTLS 1
+#endif
+
+
// Include these after system headers to avoid name clashes and ambiguities.
# include "sanitizer_common.h"
# include "sanitizer_internal_defs.h"
@@ -779,13 +785,15 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
unsigned IOCTL_SOUND_PCM_WRITE_FILTER = SOUND_PCM_WRITE_FILTER;
#endif // SOUND_VERSION
unsigned IOCTL_TCFLSH = TCFLSH;
+#if !defined(DISABLE_TERMIO_IOCTLS)
unsigned IOCTL_TCGETA = TCGETA;
- unsigned IOCTL_TCGETS = TCGETS;
- unsigned IOCTL_TCSBRK = TCSBRK;
- unsigned IOCTL_TCSBRKP = TCSBRKP;
unsigned IOCTL_TCSETA = TCSETA;
unsigned IOCTL_TCSETAF = TCSETAF;
unsigned IOCTL_TCSETAW = TCSETAW;
+#endif
+ unsigned IOCTL_TCGETS = TCGETS;
+ unsigned IOCTL_TCSBRK = TCSBRK;
+ unsigned IOCTL_TCSBRKP = TCSBRKP;
unsigned IOCTL_TCSETS = TCSETS;
unsigned IOCTL_TCSETSF = TCSETSF;
unsigned IOCTL_TCSETSW = TCSETSW;
--
2.48.1

View File

@ -1,56 +0,0 @@
From 1e49835cc5737b2dffff5923e09546b70a54f90d Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Tue, 29 Apr 2025 21:35:57 +0000
Subject: [PATCH] [sanitizer_common] Disable termio ioctls on PowerPC
glibc-2.42 removed the termio.h header, but there are refrences to it
still in the kernel's ioctl.h, so we need disable these ioctls to fix
this build.
---
.../sanitizer_platform_limits_posix.cpp | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
index 10b6535499de..303c82783528 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
@@ -173,6 +173,17 @@ typedef struct user_fpregs elf_fpregset_t;
#include <sys/sockio.h>
#endif
+#if SANITIZER_HAIKU
+#include <sys/sockio.h>
+#include <sys/ioctl.h>
+#endif
+
+// Work around struct termio usage in ioctl.h on ppc64le.
+#if SANITIZER_GLIBC && !__has_include(<termio.h>) && defined(__powerpc64__)
+ #define DISABLE_TERMIO_IOCTLS 1
+#endif
+
+
// Include these after system headers to avoid name clashes and ambiguities.
# include "sanitizer_common.h"
# include "sanitizer_internal_defs.h"
@@ -764,13 +775,15 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
unsigned IOCTL_SOUND_PCM_WRITE_FILTER = SOUND_PCM_WRITE_FILTER;
#endif // SOUND_VERSION
unsigned IOCTL_TCFLSH = TCFLSH;
+#if !defined(DISABLE_TERMIO_IOCTLS)
unsigned IOCTL_TCGETA = TCGETA;
- unsigned IOCTL_TCGETS = TCGETS;
- unsigned IOCTL_TCSBRK = TCSBRK;
- unsigned IOCTL_TCSBRKP = TCSBRKP;
unsigned IOCTL_TCSETA = TCSETA;
unsigned IOCTL_TCSETAF = TCSETAF;
unsigned IOCTL_TCSETAW = TCSETAW;
+#endif
+ unsigned IOCTL_TCGETS = TCGETS;
+ unsigned IOCTL_TCSBRK = TCSBRK;
+ unsigned IOCTL_TCSBRKP = TCSBRKP;
unsigned IOCTL_TCSETS = TCSETS;
unsigned IOCTL_TCSETSF = TCSETSF;
unsigned IOCTL_TCSETSW = TCSETSW;
--
2.48.1

235
446.patch
View File

@ -1,235 +0,0 @@
From 595c2a20d256bf8e3b2ac8687c0029b42e64878d Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov@redhat.com>
Date: Jun 13 2025 08:46:26 +0000
Subject: Invert symlink direction
This is an alternative to:
https://src.fedoraproject.org/rpms/llvm/pull-request/439.
Instead of undoing the prefix change completely, this instead inverts
the direction of the symlinks: The non-compat package ships all the
files in the default prefix, but has symlinks from the versioned
prefix to the default prefix.
The implementation approach is to install everything into the
versioned prefix first (keeping things unified between compat and
non-compat build initially) and to then move and symlink in
post-processing.
The llvm-config setup here stays the same as it currently is,
with llvm-config executables being installed in the versioned
prefix, while the one in the default prefix is managed by
alternatives. This patch does not fix the issues with alternatives
handling, we'd apply https://src.fedoraproject.org/rpms/llvm/pull-request/417
on top of this patch for that.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2365079.
---
diff --git a/Makefile b/Makefile
index ced0465..242e15d 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
# Tweak this to centos-stream-9-x86_64 to build for CentOS
MOCK_CHROOT?=fedora-rawhide-x86_64
MOCK_OPTS?=
-MOCK_OPTS_RELEASE?=--no-clean --no-cleanup-after --without lto_build --define "debug_package %{nil}" $(MOCK_OPTS)
+MOCK_OPTS_RELEASE?=--no-clean --no-cleanup-after --without lto_build --without pgo --define "debug_package %{nil}" $(MOCK_OPTS)
MOCK_OPTS_SNAPSHOT?=$(MOCK_OPTS_RELEASE) --with snapshot_build $(MOCK_OPTS)
YYYYMMDD?=$(shell date +%Y%m%d)
SOURCEDIR=$(shell pwd)
diff --git a/llvm.spec b/llvm.spec
index 9d9e5d7..dcdef08 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -316,7 +316,7 @@
#region main package
Name: %{pkg_name_llvm}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: The Low Level Virtual Machine
License: Apache-2.0 WITH LLVM-exception OR NCSA
@@ -1330,8 +1330,15 @@ popd
-DCLANG_INCLUDE_TESTS:BOOL=ON \\\
-DCLANG_PLUGIN_SUPPORT:BOOL=ON \\\
-DCLANG_REPOSITORY_STRING="%{?dist_vendor} %{version}-%{release}" \\\
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../clang-tools-extra \\\
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../clang-tools-extra
+
+%if %{with compat_build}
+%global cmake_config_args %{cmake_config_args} \\\
-DCLANG_RESOURCE_DIR=../../../lib/clang/%{maj_ver}
+%else
+%global cmake_config_args %{cmake_config_args} \\\
+ -DCLANG_RESOURCE_DIR=../lib/clang/%{maj_ver}
+%endif
#endregion clang options
#region compiler-rt options
@@ -1938,8 +1945,12 @@ rm -Rvf %{buildroot}%{install_datadir}/clang-doc
# TODO: What are the Fedora guidelines for packaging bash autocomplete files?
rm -vf %{buildroot}%{install_datadir}/clang/bash-autocomplete.sh
-# Create sub-directories in the clang resource directory that will be
-# populated by other packages
+%if %{without compat_build}
+# Move clang resource directory to default prefix.
+mkdir -p %{buildroot}%{_prefix}/lib/clang
+mv %{buildroot}%{install_prefix}/lib/clang/%{maj_ver} %{buildroot}%{_prefix}/lib/clang/%{maj_ver}
+%endif
+# Create any missing sub-directories in the clang resource directory.
mkdir -p %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/{bin,include,lib,share}/
# Add versioned resource directory macro
@@ -2025,7 +2036,7 @@ rmdir %{buildroot}%{install_prefix}/%{_lib}/python%{python3_version}
# python: fix binary libraries location
liblldb=$(basename $(readlink -e %{buildroot}%{install_libdir}/liblldb.so))
-ln -vsf "../../../llvm%{maj_ver}/lib/${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so
+ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so
%py_byte_compile %{__python3} %{buildroot}%{python3_sitearch}/lldb
%endif
%endif
@@ -2066,62 +2077,69 @@ popd
rm -f %{buildroot}%{install_libdir}/libLLVMBOLT*.a
#endregion BOLT installation
-# Create symlinks from the system install prefix to the llvm install prefix.
+# Move files from src to dest and replace the old files in src with relative
+# symlinks.
+move_and_replace_with_symlinks() {
+ local src="$1"
+ local dest="$2"
+ mkdir -p "$dest"
+
+ # Change to source directory to simplify relative paths
+ (cd "$src" && \
+ find * -type d -exec mkdir -p "$dest/{}" \; && \
+ find * \( -type f -o -type l \) -exec mv "$src/{}" "$dest/{}" \; \
+ -exec ln -s --relative "$dest/{}" "$src/{}" \;)
+}
+
+%if %{without compat_build}
+# Move files from the llvm prefix to the system prefix and replace them with
+# symlinks. We do it this way around because symlinks between multilib packages
+# would conflict otherwise.
+move_and_replace_with_symlinks %{buildroot}%{install_bindir} %{buildroot}%{_bindir}
+move_and_replace_with_symlinks %{buildroot}%{install_libdir} %{buildroot}%{_libdir}
+move_and_replace_with_symlinks %{buildroot}%{install_libexecdir} %{buildroot}%{_libexecdir}
+move_and_replace_with_symlinks %{buildroot}%{install_includedir} %{buildroot}%{_includedir}
+move_and_replace_with_symlinks %{buildroot}%{install_datadir} %{buildroot}%{_datadir}
+%endif
+
+# Create versioned symlinks for binaries.
# Do this at the end so it includes any files added by preceding steps.
mkdir -p %{buildroot}%{_bindir}
for f in %{buildroot}%{install_bindir}/*; do
filename=`basename $f`
- if [[ "$filename" == "clang-%{maj_ver}" ]]; then
+ if [[ "$filename" =~ ^(lit|ld|clang-%{maj_ver})$ ]]; then
continue
fi
- # Add symlink for binaries with version suffix.
- ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename-%{maj_ver}
- # For non-compat builds, also add a symlink without version suffix.
- %if %{without compat_build}
- ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename
+ %if %{with compat_build}
+ ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename-%{maj_ver}
+ %else
+ # clang-NN is already created by the build system.
+ if [[ "$filename" == "clang" ]]; then
+ continue
+ fi
+ ln -s $filename %{buildroot}/%{_bindir}/$filename-%{maj_ver}
%endif
done
-# Move man pages to system install prefix.
mkdir -p %{buildroot}%{_mandir}/man1
for f in %{buildroot}%{install_mandir}/man1/*; do
filename=`basename $f`
filename=${filename%.1}
- mv $f %{buildroot}%{_mandir}/man1/$filename-%{maj_ver}.1
- %if %{without compat_build}
- ln -s $filename-%{maj_ver}.1 %{buildroot}%{_mandir}/man1/$filename.1
+ %if %{with compat_build}
+ # Move man pages to system install prefix.
+ mv $f %{buildroot}%{_mandir}/man1/$filename-%{maj_ver}.1
+ %else
+ # Create suffixed symlink.
+ ln -s $filename.1 %{buildroot}%{_mandir}/man1/$filename-%{maj_ver}.1
%endif
done
-rmdir %{buildroot}%{install_mandir}/man1
-rmdir %{buildroot}%{install_mandir}
+rm -rf %{buildroot}%{install_mandir}
+# As an exception, always keep llvm-config in the versioned prefix.
+# The llvm-config in the default prefix will be managed by alternatives.
%if %{without compat_build}
-# We don't create directory symlinks, because RPM does not support
-# switching between a directory and a symlink, causing upgrade/downgrade issues.
-# Instead, recursively copy the directories while creating symlinks.
-copy_with_relative_symlinks() {
- local src="$1"
- local dest="$2"
- mkdir -p "$dest"
-
- # Change to source directory to simplify relative paths
- (cd "$src" && \
- find * -type d -exec mkdir -p "$dest/{}" \; && \
- find * \( -type f -o -type l \) -exec ln -s --relative "$src/{}" "$dest/{}" \;)
-}
-
-# Add symlinks for libraries.
-copy_with_relative_symlinks %{buildroot}%{install_libdir} %{buildroot}%{_libdir}
-copy_with_relative_symlinks %{buildroot}%{install_libexecdir} %{buildroot}%{_libexecdir}
-copy_with_relative_symlinks %{buildroot}%{install_includedir} %{buildroot}%{_includedir}
-copy_with_relative_symlinks %{buildroot}%{install_datadir} %{buildroot}%{_datadir}
-
-%if %{maj_ver} >= 21 && %{with offload}
-# Remove offload libaries since we only want to ship these in the configured
-# install prefix.
-rm -Rf %{buildroot}%{_libdir}/amdgcn-amd-amdhsa
-rm -Rf %{buildroot}%{_libdir}/nvptx64-nvidia-cuda
-%endif
+rm %{buildroot}%{install_bindir}/llvm-config
+mv %{buildroot}%{_bindir}/llvm-config %{buildroot}%{install_bindir}/llvm-config
%endif
# ghost presence for llvm-config, managed by alternatives.
@@ -3164,10 +3182,12 @@ fi
libomptarget-nvptx*.bc
}}
%else
-%{install_libdir}/amdgcn-amd-amdhsa/libompdevice.a
-%{install_libdir}/amdgcn-amd-amdhsa/libomptarget-amdgpu.bc
-%{install_libdir}/nvptx64-nvidia-cuda/libompdevice.a
-%{install_libdir}/nvptx64-nvidia-cuda/libomptarget-nvptx.bc
+%{expand_libs %{expand:
+ amdgcn-amd-amdhsa/libompdevice.a
+ amdgcn-amd-amdhsa/libomptarget-amdgpu.bc
+ nvptx64-nvidia-cuda/libompdevice.a
+ nvptx64-nvidia-cuda/libomptarget-nvptx.bc
+}}
%endif
%expand_includes offload
@@ -3403,6 +3423,10 @@ fi
#region changelog
%changelog
+* Tue Jun 10 2025 Nikita Popov <npopov@redhat.com> - 20.1.6-8
+- Invert symlink direction
+- Fix i686 multilib installation (rhbz#2365079)
+
* Thu Jun 05 2025 Timm Bäder <tbaeder@redhat.com> - 20.1.6-7
- Backport patch to fix rhbz#2363895

5
README
View File

@ -1,5 +0,0 @@
This is the dist-git repo for llvm.
The master branch is unused. Use an existing branch instead.
See rhpkg --help for more information.

1013
changelog Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,19 +1,31 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
decision_contexts:
- bodhi_update_push_testing
- bodhi_update_push_stable
- bodhi_update_push_stable_critpath
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./tests/build-gating.functional}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./tests/lld-alternatives.functional}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
# The version number here should match the current rawhide release.
- fedora-44
decision_contexts:
- bodhi_update_push_stable
- bodhi_update_push_stable_critpath
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./tests/kernel-ark-build.functional}
--- !Policy
product_versions:
- rhel-9
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier0.functional}
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier0-tmt-x86_64-aarch64.functional}
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier0-tmt-s390x-ppc64le.functional}
- !PassingTestCaseRule {test_case_name: osci.brew-build.rebuild.validation}

Binary file not shown.

Binary file not shown.

View File

@ -1,2 +1,49 @@
## LLVM #############################################################
# This library has no dependencies.
addFilter("llvm-libs.x86_64: E: shared-lib-without-dependency-information /usr/lib64/libRemarks.so.[0-9]+")
addFilter("llvm-googletest.x86_64: W: devel-file-in-non-devel-package")
# same for llvm-test utilities
addFilter("llvm-test.x86_64: W: no-manual-page-for-binary")
# Don't warn about libs in llvm-libs
addFilter("llvm-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/lib")
# These is ok in the llvm gold plugin
addFilter("llvm-libs.x86_64: W: shared-lib-calls-exit /usr/lib64/LLVMgold.so")
addFilter("llvm-libs.x86_64: W: no-soname /usr/lib64/LLVMgold.so")
# These are without documentation
addFilter("llvm-googletest.x86_64: W: no-documentation")
addFilter("llvm-libs.x86_64: W: no-documentation")
addFilter("llvm-static.x86_64: W: no-documentation")
addFilter("llvm-test.x86_64: W: no-documentation")
## COMPILER-RT ######################################################
# This is a devel package
addFilter("W: devel-file-in-non-devel-package")
# These symlinks are dangling on x64_64
addFilter("compiler-rt.x86_64: W: dangling-relative-symlink /usr/lib64/clang/[0-9]+.[0-9]+.[0-9]+/")
addFilter("E: hardcoded-library-path in ../../lib/clang/")
## LIBOMP ###########################################################
## CLANG ############################################################
clang needs libstdc++-devel installed in order to compile c++ programs.
addFilter("E: devel-dependency libstdc\+\+-devel")
addFilter("E: explicit-lib-dependency libstdc\+\+-devel")
# clang installs libear to /usr/lib on all arches, so we have to use
# a hard-coded /usr/lib path in order to move it to the python3 sitelib.
addFilter("E: hardcoded-library-path in %{_prefix}/lib/{libear")

1880
llvm.spec

File diff suppressed because it is too large Load Diff

View File

@ -102,3 +102,29 @@ yWfeofTJ7PhKzoXM2Y/rRFoM5gNh1RVA19ngLT5Jwiof8fPZvHJ/9ZkHn+O7eMNm
m5++gYza3pnn2/PoGpGGAKok+sfJiq5Tb7RUefyJTeZiyTZ/XJrA
=tMzl
-----END PGP PUBLIC KEY BLOCK-----
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEaMgtRhYJKwYBBAHaRw8BAQdA4NRjJPhVd56sOM+QmTbZKkRT3bYbgg6+Bxed
CELeGp+0JUN1bGxlbiBSaG9kZXMgPGN1bGxlbi5yaG9kZXNAYXJtLmNvbT6IkwQT
FgoAOxYhBHEEbR6cZla91hFxhz6Dur9KT56FBQJoyC1GAhsDBQsJCAcCAiICBhUK
CQgLAgQWAgMBAh4HAheAAAoJED6Dur9KT56FkVwA/RLNMBHrjXoAKpRm1iIjiC6w
gLRqGOnj1qAqPqgntMmmAQCQ2lGpw46rvh88ng84IGsRF0JlTAYb6SR/YYNsQyah
Arg4BGjILUYSCisGAQQBl1UBBQEBB0B48hCLw13kduwibGDGoIax0BIa+f66IUC+
HhNlucsjbgMBCAeIeAQYFgoAIBYhBHEEbR6cZla91hFxhz6Dur9KT56FBQJoyC1G
AhsMAAoJED6Dur9KT56FVssBAO1lL/S2cU65XFHgbjc6crwljDrD7PYbxBA7hDpi
pC4ZAP98rK1hGQ5wxpeiJ0heZ8zhpdUwEeymIDBaIcwgrJRFBQ==
=HcEB
-----END PGP PUBLIC KEY BLOCK-----
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEaMg2hBYJKwYBBAHaRw8BAQdA2J814YnhPQSdsyjwx8VxZ7AitqCnns9lzvkx
HX9lWMW0JERvdWdsYXMgWXVuZyA8ZG91Z2xhcy55dW5nQHNvbnkuY29tPoiTBBMW
CgA7FiEE/7M2iYDz5rtXNxRaMWxW0GTKy6UFAmjINoQCGwMFCwkIBwICIgIGFQoJ
CAsCBBYCAwECHgcCF4AACgkQMWxW0GTKy6XjYgEApJ7p+o7EAeaaOdO2f440KDfg
t7haaBLaxr5fiaSKjkYA+gLDxWOh39Y84upf23qMmpSTZ3SK5LvJtBTVtV7AEX0B
uDgEaMg2hBIKKwYBBAGXVQEFAQEHQL3CL6jHZAakhtLLj2Ks34u7ItY/7USl/bYk
f/+mZTJMAwEIB4h4BBgWCgAgFiEE/7M2iYDz5rtXNxRaMWxW0GTKy6UFAmjINoQC
GwwACgkQMWxW0GTKy6VTOgEArDn9bg58W7bfZfVfneJJbIeICEf3NN9IovbRbAOB
ax0A/RxtrG4qowLlo907vb25ITOa1hBoheSV2wNoDaDUhFEF
=JQ8u
-----END PGP PUBLIC KEY BLOCK-----

29
rpminspect.yaml Normal file
View File

@ -0,0 +1,29 @@
---
inspections:
# We need to disable abidiff due to abidiff+testing-farm issues. Ref link:
# https://docs.testing-farm.io/Testing%20Farm/0.1/errors.html#TFE-1
abidiff: off
badfuncs:
# For compiler-rt, we allow the following forbidden functions:
# - gethostbyname
# - gethostbyname2
# - gethostbyaddr
# - inet_aton
# These are never actually used, and are installed just as interceptors.
allowed:
/usr/lib*/clang/*/lib/*/libclang_rt.?san.so:
- gethostbyaddr
- gethostbyname
- gethostbyname2
- inet_aton
/usr/lib*/clang/*/lib/*/libclang_rt.memprof.so:
- gethostbyaddr
- gethostbyname
- gethostbyname2
- inet_aton
unicode:
ignore:
# Ignore bidirectional unicode sequence documentation file
- llvm-project-*.src/clang-tools-extra/docs/clang-tidy/checks/misc/misleading-bidirectional.rst

View File

@ -1,2 +1,2 @@
SHA512 (llvm-project-20.1.8.src.tar.xz) = f330e72e6a1da468569049437cc0ba7a41abb816ccece7367189344f7ebfef730f4788ac7af2bef0aa8a49341c15ab1d31e941ffa782f264d11fe0dc05470773
SHA512 (llvm-project-20.1.8.src.tar.xz.sig) = d74369bdb4d1b82775161ea53c9c5f3a23ce810f4df5ff617123023f9d8ce720e7d6ecc9e17f8ebd39fd9e7a9de79560abdf2ffe73bcb907a43148d43665d619
SHA512 (llvm-project-21.1.4.src.tar.xz) = a8c0883abe7c5a3e55ca7ed0fd974fae4351184a0b0df18295a982ca8ddb0f8d167353564204ed00f0cd9a1d8baef7074c0b39a99e0b5c52ced6bbee73dde3da
SHA512 (llvm-project-21.1.4.src.tar.xz.sig) = 4812c2e3861aa3b726d842c3ca259b19ef1aa531fed9f6f47099483de91de2b2a165f40d243f6f40f2eea749741d5f8b7090f394399c56db02053f308921077a

9
tests/README.md Normal file
View File

@ -0,0 +1,9 @@
# Gating testplans for LLVM
The tests for LLVM are in a separate repo:
* llvm: https://gitlab.com/redhat/centos-stream/tests/llvm.git/
This directory should contain only fmf plans (such as build-gating.fmf) which import
the tests from the tests repo. This can be done using the "url" parameter of the
plan's "discover" step. Reference: https://tmt.readthedocs.io/en/stable/spec/plans.html#fmf

View File

@ -1,16 +1,17 @@
#
# Build/PR gating tests for *LLVM 13*
# Build/PR gating tests for *LLVM 19*
#
# Imports and runs tests provided by Fedora LLVM git for the matching LLVM version.
# Compatible with various LLVM 19 distributions:
#
# NOTE: *always* keep this file in sync with upstream, i.e. Fedora. Since we cannot "discover" a plan,
# we must duplicate at least some part of upstream plan setup, like `adjust` or `provision`. Not necessarily
# all steps, btu if we do need some of them here, let's focus on making changes in upstream first, to preserve
# one source of truth. Once TMT learns to include whole plans, we could drop the copied content from here.
# * Fedora (ursine packages)
# * CentOS 10 stream (ursine packages)
# * Centos 9 stream (ursine packages)
# * RHEL-10 (ursine packages)
# * RHEL-9 (ursine packages)
# * RHEL-8 (Red Hat module)
#
summary: LLVM tests for build/PR gating
adjust:
- because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR."
when: >-
@ -20,32 +21,31 @@ adjust:
enabled: false
# Unfortunatelly, TMT does not support more declarative approach, we need to run commands on our own.
- because: "On RHEL, CRB must be enabled to provide rarer packages"
when: >-
distro == rhel-9
or distro == rhel-8
prepare+:
- name: Enable CRB
how: shell
script: dnf config-manager --set-enabled rhel-CRB
- because: "On RHEL, CRB must be enabled to provide rarer packages"
when: >-
distro == centos
- because: "On CentOS, CRB must be enabled to provide rarer packages"
prepare+:
- name: Enable CRB
how: shell
script: dnf config-manager --set-enabled crb
when: >-
distro == centos
# Unfortunately, TMT does not support more declarative approach, we need to run commands on our own.
- because: "On RHEL, CRB must be enabled to provide rarer packages"
prepare+:
- name: Enable CRB
how: shell
script: dnf config-manager --set-enabled rhel-CRB
when: >-
distro == rhel-9
or distro == rhel-8
discover:
- name: "Upstream LLVM tests for build/PR gating"
how: fmf
url: https://gitlab.com/redhat/centos-stream/tests/llvm
ref: main
filter: "tag:-spoils-installation & tag:-not-in-default"
how: fmf
url: https://gitlab.com/redhat/centos-stream/tests/llvm.git
ref: main
filter: "tag:-spoils-installation & tag:-not-in-default"
execute:
how: tmt
how: tmt
provision:
hardware:
memory: ">= 4 GiB"

View File

@ -0,0 +1,20 @@
summary: LLD tests for build/PR gating, testing alternatives and spoiling the installation
adjust:
- because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR."
when: >-
trigger is defined
and trigger != commit
and trigger != build
enabled: false
discover:
- name: lld-alternatives
how: fmf
url: https://gitlab.com/redhat/centos-stream/tests/llvm.git
ref: main
test: ld-alternative
execute:
how: tmt
provision:
hardware:
memory: ">= 4 GiB"