mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-11-28 10:35:42 +00:00
ab194f104b
* %check: export LD_LIBRARY_PATH because runtimes use external cmake projects that wouldn't find libclang++.so * %check: use LLVM's LIT_XFAIL to mark tests that are expected to fail and don't just delete them * clang: bring over *.patch files * clang: remove build requires tags from clang package that are already defined by main llvm package * clang: remove duplicates found in llvm globals and use %{pkg_datadir} instead of %{install_datadir} * clang: rename and use pkg_name -> pkg_name_clang * clang: use %{pkg_name_clang} instead of %{name} * compiler-rt and libomp: wrap in %if %{without compat_build} * libomp: also build libomp for s390x (See https://github.com/llvm/llvm-project/pull/66081) * libomp: exclude libomp-devel on s390x just like libomp itself * libomp: introduce pkg_name_libomp and cleanup the globals * libomp: remove gdb-plugin (NEED TO CONFIRM IF THIS IS REALLY TRUE) * libomp: filter out flaky libomp test: ompt/teams/distribute_dispatch.c * llvm: add BuildRequires: graphviz to llvm-doc * llvm: use %{pkg_name_llvm} instead of %{name} * make: added temporary Makefile so I can more easily run srpm or rpm builds locally * make: Added local-tmt-vm target (not really useful yet) * rpm: for non-RHEL add prefix like "Jan 05 16:17:06" to every log line This should help in finding out how long things take to build/install/... * rpm: fully specify %files for top-level packages * rpm: make all packages fully qualified * rpm: obsolete llvm-snapshot-builder * rpm: remove BuildRequires: python3-lit because we have it in-tree * rpm: remove BuildRequires: tags for clang and llvm specifics as we're building in-tree * rpm: rename %llvm_srcdir -> %srcdir_llvm * rpm: rename %pkg_name -> %pkg_name_llvm * rpm: use full qualified name in %description * rpm: use region comments in spec file to group by package. This allows editors to fold text to get a better overview * rpmlint: update rc file to reflect clang and compiler-rt (libomp has no rpmlint rc file) * use python-lit from within tree
76 lines
3 KiB
Bash
Executable file
76 lines
3 KiB
Bash
Executable file
#!/usr/bin/bash
|
|
|
|
# You need these packages to run this script: git tar xz curl-minimal
|
|
|
|
set -e
|
|
set +x
|
|
|
|
# This is important for systems that have a different local but want to produce
|
|
# a valid changelog date.
|
|
LANG=en_EN
|
|
|
|
function loginfo() {
|
|
local msg=$1
|
|
>&2 echo "[INFO]" $msg
|
|
}
|
|
|
|
loginfo "Determine date in YYYYMMDD form"
|
|
llvm_snapshot_yyyymmdd=$(date +%Y%m%d)
|
|
[[ ! -z "${YYYYMMDD}" ]] && llvm_snapshot_yyyymmdd=$YYYYMMDD
|
|
|
|
loginfo "Get the source tarball"
|
|
tarball_url=https://github.com/kwk/llvm-daily-fedora-rpms/releases/download/source-snapshot/llvm-project-${llvm_snapshot_yyyymmdd}.src.tar.xz
|
|
tarball=llvm-project-${llvm_snapshot_yyyymmdd}.src.tar.xz
|
|
if [ -e $tarball ]; then
|
|
loginfo "Source tarball already exists: $tarball"
|
|
else
|
|
loginfo "Downloading source tarball $tarball from $tarball_url"
|
|
curl -sL -o $tarball ${tarball_url}
|
|
fi
|
|
|
|
loginfo "Grab git revision from tarball"
|
|
llvm_snapshot_git_revision=$(xzcat $tarball | git get-tar-commit-id)
|
|
llvm_snapshot_git_revision_short=$(echo "${llvm_snapshot_git_revision:0:14}")
|
|
|
|
versionfile=llvm-project*.src/cmake/Modules/LLVMVersion.cmake
|
|
loginfo "Extract the ${versionfile} file from the source tarball"
|
|
if [ -e $versionfile ]; then
|
|
loginfo "CMakeLists.txt already exists: ${versionfile}"
|
|
else
|
|
tar -xf $tarball $versionfile
|
|
fi
|
|
|
|
loginfo "Parse ${versionfile} for the LLVM version"
|
|
llvm_snapshot_version=$(grep -ioP 'set\(\s*LLVM_VERSION_(MAJOR|MINOR|PATCH)\s\K[0-9]+' ${versionfile} | paste -sd '.')
|
|
llvm_snapshot_version_major=$(echo $llvm_snapshot_version | cut -f1 -d.)
|
|
llvm_snapshot_version_minor=$(echo $llvm_snapshot_version | cut -f2 -d.)
|
|
llvm_snapshot_version_patch=$(echo $llvm_snapshot_version | cut -f3 -d.)
|
|
llvm_snapshot_version_suffix=pre${llvm_snapshot_yyyymmdd}.g${llvm_snapshot_git_revision_short}
|
|
llvm_snapshot_version_tag=${llvm_snapshot_version}~${llvm_snapshot_version_suffix}
|
|
llvm_snapshot_changelog_entry="* $(date +'%a %b %d %Y') LLVM snapshot - ${llvm_snapshot_version_tag}"
|
|
|
|
tempfile=$(mktemp)
|
|
cat > $tempfile <<EOF
|
|
%global maj_ver ${llvm_snapshot_version_major}
|
|
%global min_ver ${llvm_snapshot_version_minor}
|
|
%global patch_ver ${llvm_snapshot_version_patch}
|
|
%undefine rc_ver
|
|
|
|
%global llvm_snapshot_version ${llvm_snapshot_version}
|
|
%global llvm_snapshot_version_tag ${llvm_snapshot_version_tag}
|
|
%global llvm_snapshot_version_major ${llvm_snapshot_version_major}
|
|
%global llvm_snapshot_version_minor ${llvm_snapshot_version_minor}
|
|
%global llvm_snapshot_version_patch ${llvm_snapshot_version_patch}
|
|
%global llvm_snapshot_yyyymmdd ${llvm_snapshot_yyyymmdd}
|
|
%global llvm_snapshot_git_revision ${llvm_snapshot_git_revision}
|
|
%global llvm_snapshot_git_revision_short ${llvm_snapshot_git_revision_short}
|
|
%global llvm_snapshot_version_suffix ${llvm_snapshot_version_suffix}
|
|
%global llvm_snapshot_changelog_entry ${llvm_snapshot_changelog_entry}
|
|
%global llvm_snapshot_source_prefix https://github.com/kwk/llvm-daily-fedora-rpms/releases/download/source-snapshot/
|
|
EOF
|
|
|
|
# One for logs
|
|
cat $tempfile >&2
|
|
|
|
# One to redirect it away
|
|
cat $tempfile
|