Update to 14.0.5

Resolves: rhbz#2061056
This commit is contained in:
Timm Bäder 2022-06-20 12:28:10 +02:00
parent b824270114
commit e9e5adc47f
18 changed files with 255 additions and 29 deletions

2
.gitignore vendored
View File

@ -110,3 +110,5 @@
/llvm-13.0.1.src.tar.xz.sig
/llvm-14.0.0.src.tar.xz
/llvm-14.0.0.src.tar.xz.sig
/llvm-14.0.5.src.tar.xz
/llvm-14.0.5.src.tar.xz.sig

View File

@ -11,7 +11,7 @@
%endif
%bcond_with compat_build
%bcond_without bundle_compat_lib
%bcond_with bundle_compat_lib
%bcond_without check
%if %{with bundle_compat_lib}
@ -24,7 +24,7 @@
#global rc_ver 4
%global maj_ver 14
%global min_ver 0
%global patch_ver 0
%global patch_ver 5
%if !%{maj_ver} && 0%{?rc_ver}
%global abi_revision 2
%endif
@ -74,7 +74,7 @@
Name: %{pkg_name}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
Release: 2%{?dist}
Release: 1%{?dist}
Summary: The Low Level Virtual Machine
License: NCSA
@ -600,6 +600,9 @@ fi
%endif
%changelog
* Mon Jun 20 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.5-1
- Update to 14.0.5
* Fri Apr 29 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.0-2
- Remove llvm-cmake-devel package

View File

@ -1,3 +1,2 @@
SHA512 (llvm-14.0.0.src.tar.xz) = 3e2e9d7ccc44abeff189b76c3a8b1fcfed1f6846e8933cd002d9476a017f28ef4bd8d0e290be1838d50054038a3e0bcfad29d28733a01b811ddaaf11e0c4445f
SHA512 (llvm-13.0.1.src.tar.xz) = 05fbe8708ac3d0dfef3a9135ee88185a95ed492095429a97d33b8aadb0187e59ad42d1a7184f02b5c84fdd31f3d7227c65bd292ed0aa039b29522e59cf90a965
SHA512 (llvm-14.0.0.src.tar.xz.sig) = ac9c5508644a2bad10a7c7bc46f3f9a127b8e83c136bc553252048b14a2b72f924034490c0cdcf32c91b30b03e26768c925e3155fce5748bc2b53ed581056555
SHA512 (llvm-14.0.5.src.tar.xz) = 03b9ecedd14eb034d16fde945d395672990b2140bff713a65e701711ef5934b967850762fcb2d75db72abb56ad0354d4f5d768f1005add979a859c93565004d2
SHA512 (llvm-14.0.5.src.tar.xz.sig) = d994b6b92a6c3eba93f328f582287d834bdd068ff80030659f74c35f6da501e8121eb03a5a9431aa0a556145fc9087d2081352106d75305032b6020d2278683f

View File

@ -0,0 +1,2 @@
summary: Make sure the the LLVM plugin for binutils' ar works
test: "$WITH_SCL ./test.sh"

View File

@ -0,0 +1,7 @@
#!/bin/sh -eux
set pipefail
echo "void lto_function(){}" | clang -flto -O2 -c -x c -o foo.o -
ar crs foo.a foo.o
readelf -c foo.a | grep lto_function

View File

@ -0,0 +1,3 @@
summary: Make sure rebuilding LLVM still works with the new LLVM
test: "$WITH_SCL ./test.sh"
enabled: false

14
tests/build-compat/test.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh -eux
dnf download --disablerepo=* --enablerepo=test-llvm --source llvm
# The src.rpm is available in the directory the test run from.
set +e
mock --resultdir=. --old-chroot --with compat_build --rebuild *.src.rpm
if [ $? -ne 0 ]; then
cat root.log
cat build.log
exit 1
fi
exit 0

View File

@ -1,16 +1,16 @@
#
# Build/PR gating tests for *LLVM 13*
#
# Imports and runs tests provided by Fedora LLVM git for the matching LLVM version.
# Compatible with various LLVM 13 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 9 stream (ursine packages)
# * RHEL-9 (ursine packages)
# * RHEL-8 (Red Hat module)
# * RHEL-7 (software collection)
#
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: >-
@ -19,32 +19,38 @@ adjust:
and trigger != build
enabled: false
- because: "When testing SCL-ized LLVM, the collection must be enabled first"
environment+:
WITH_SCL: "scl enable llvm-toolset-13.0 rust-toolset-1.58"
when: "collection == llvm-toolset-13.0"
- because: "When testing SCL-ized LLVM, the collection must be enabled first"
environment+:
WITH_SCL: "scl enable llvm-toolset-14.0 rust-toolset-1.62"
when: "collection == llvm-toolset-14.0"
# 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://src.fedoraproject.org/rpms/llvm.git
ref: rawhide
execute:
how: tmt
how: tmt
provision:
hardware:
memory: ">= 4 GiB"

View File

@ -0,0 +1,81 @@
summary: Run the upstream LLVM integration test suite
description: |
Run the upstream LLVM integration test suite
test: "$WITH_SCL ./test.sh"
require:
- git
- make
# These require special repositories to be enabled on RHEL
- libstdc++-static
adjust:
# Common requirements when LLVM is not SCL-ized
- require+:
- cmake
- clang
- clang-analyzer
- clang-devel
- clang-tools-extra
- compiler-rt
- lld
- lldb
- libomp-devel
- llvm-devel
- python3-lit
when: "collection is not defined"
# Requirements for SCL-ized LLVM
- require+:
- llvm-toolset-13.0-cmake
- llvm-toolset-13.0-clang
- llvm-toolset-13.0-clang-analyzer
- llvm-toolset-13.0-clang-devel
- llvm-toolset-13.0-clang-tools-extra
- llvm-toolset-13.0-compiler-rt
- llvm-toolset-13.0-lld
- llvm-toolset-13.0-lldb
- llvm-toolset-13.0-libomp-devel
- llvm-toolset-13.0-llvm-devel
- llvm-toolset-13.0-python3-lit
when: "collection == llvm-toolset-13.0"
- require+:
- llvm-toolset-14.0-cmake
- llvm-toolset-14.0-clang
- llvm-toolset-14.0-clang-analyzer
- llvm-toolset-14.0-clang-devel
- llvm-toolset-14.0-clang-tools-extra
- llvm-toolset-14.0-compiler-rt
- llvm-toolset-14.0-lld
- llvm-toolset-14.0-lldb
- llvm-toolset-14.0-libomp-devel
- llvm-toolset-14.0-llvm-devel
- llvm-toolset-14.0-python3-lit
when: "collection == llvm-toolset-14.0"
# lld not supported in s390x or ppc64. If any lld package was added to
# requirements, remove it.
- require-:
- lld
- llvm-toolset-13.0-lld
- llvm-toolset-14.0-lld
when: arch == s390x or arch == ppc64
# libomp not supported in s390x. If any libomp-devel package was added to
# requirements, remove it.
- require-:
- libomp-devel
- llvm-toolset-13.0-libomp-devel
- llvm-toolset-14.0-libomp-devel
when: arch == s390x
# libcxx shall be required in Fedora, it's not shipped with RHEL.
- require+:
- libcxx-devel
when: "distro == fedora"
because: testing against libcxx package in Fedora
- environment+:
CMAKE_CXXLIB: "-DENABLE_LIBCXX=OFF"
when: >-
distro == centos
or distro == rhel
because: libcxx is not shipped with neither Centos nor RHEL

View File

@ -0,0 +1,39 @@
#!/bin/sh -eux
usage() {
echo "usage `basename $0` [OPTIONS]"
echo " --threads NUM The number of threads to use for running tests."
}
threads=0
thread_args=""
repo_url=https://github.com/opencollab/llvm-toolchain-integration-test-suite
while [ $# -gt 0 ]; do
case $1 in
--threads)
shift
threads="$1"
;;
* )
echo "unknown option: $1"
echo ""
usage
exit 1
;;
esac
shift
done
if [ "$threads" -ge 1 ]; then
thread_args="-j$threads"
fi
cd $(mktemp -d -p /var/tmp)
git clone $repo_url
cd llvm-toolchain-integration-test-suite
mkdir _build && cd _build
cmake .. ${CMAKE_CXXLIB:-}
# Do not run with make as it will return 2 in case of failures, which will be
# reported by tmt as error instead failure. Run with lit so it returns 1.
lit --show-unsupported --show-xfail -v tests

View File

@ -0,0 +1,13 @@
summary: Check that libLLVM.so has been properly stripped
test: "$WITH_SCL ./test.sh"
environment:
LIBLLVM_PATH: /usr/lib64/libLLVM.so
adjust:
- because: "With SCL-ized LLVM, library path is different"
environment+:
LIBLLVM_PATH: /opt/rh/llvm-toolset-13.0/root/usr/lib64/libLLVM.so
when: "collection == llvm-toolset-13.0"
- because: "With SCL-ized LLVM, library path is different"
environment+:
LIBLLVM_PATH: /opt/rh/llvm-toolset-14.0/root/usr/lib64/libLLVM.so
when: "collection == llvm-toolset-14.0"

10
tests/libllvm-size/test.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh -eux
# There is a bug in the build process when it runs out of disk space
# while stripping binaries, which causes the strip to fail, but does
# not fail the build. This results in a libLLVM.so that is over 2GB
# which breaks the nightly compose. So this test checks that libLLVM.so
# is less than 150MB to ensure it was successfully stripped.
# https://bugzilla.redhat.com/show_bug.cgi?id=1793250
test $(stat -L -c %s $LIBLLVM_PATH) -lt 157286400

View File

@ -0,0 +1,2 @@
summary: Make sure llvm-config symlink is properly set up
test: "$WITH_SCL ./test.sh"

3
tests/llvm-config/test.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -eux
llvm-config --version

View File

@ -0,0 +1,30 @@
summary: Test basic cargo usage
test: "$WITH_SCL ./test.sh"
require: []
adjust:
# Common requirements when LLVM is not SCL-ized
- require+:
# Required for rust and possibly other dependant packages
#
# NOTE #1: drop the requirement once the transitional period between releases is gone
# and llvm-compat is no longer a) needed, and b) part of the build.
#
# NOTE #2: keep it the first requirement. Depending on the order of requirements, placing it somewhere
# else in the list may lead to harness uninstalling and re-installing LLVM packages. That a) would be
# a waste of time, b) could potentially hide issues, leading to testing unexpected NVRs.
#
# - llvm-compat
- cargo
- rust
when: "collection is not defined"
# Requirements for SCL-ized LLVM
- require+:
- rust-toolset-1.58-cargo
- rust-toolset-1.58-rust
when: "collection == llvm-toolset-13.0"
- require+:
- rust-toolset-1.62-cargo
- rust-toolset-1.62-rust
when: "collection == llvm-toolset-14.0"

5
tests/rust-sanity/test.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh -eux
cargo new hello
cd hello
cargo run

View File

@ -0,0 +1,2 @@
summary: Make sure the versioned llvm-config symlink is properly set up
test: "$WITH_SCL ./test.sh"

View File

@ -0,0 +1,5 @@
#!/bin/sh -eux
major=$(llvm-config --version | cut -d '.' -f1)
llvm-config-$major --version