llvm-runtimes/openmp: Add 23.0.0_pre20260428 snapshot

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2026-04-28 15:46:13 +02:00
parent 54be0bf159
commit 0fb8575685
2 changed files with 178 additions and 0 deletions
+1
View File
@@ -12,4 +12,5 @@ DIST llvm-project-21.1.8.src.tar.xz 158958576 BLAKE2B 0d3d4ee920f8e5db50e9815261
DIST llvm-project-21.1.8.src.tar.xz.sig 119 BLAKE2B cffc1825f5778a3e3c128ec3e856ff6ee50687319d621cdf42e895abf67e05cc51cb7493308e2b506ab60dbdbaca7aa75eb9f78d91d42c81f9682a36f4042e9d SHA512 10f58eff58ed6e701d0f123b15e68c82ab8cbdf99b1c86c0d83e3b8553e90ea51055e30327e8e442ded57c8f503e2a2de9ee075e9c28b5ba815a0f8922f8671c
DIST llvm-project-22.1.4.src.tar.xz 167028880 BLAKE2B cd867371fecc8b4771c919a4d966cec25539dbaff5398e9c62ab5fe2f82b97bcc097f2319194cb796f6ee874b83c001ece5dc2d2e41c8807f88d91e67b71cf61 SHA512 9f9e84110a4bb0f0dd296eaed4acb4fd3a58838efe62bb88671399440ba4750ba8bd7e6d072e61a9946e38e5c9d5e50575b95964850769c51cd517bdf7425bb8
DIST llvm-project-22.1.4.src.tar.xz.sig 119 BLAKE2B ff8004fd03f1d5be9da33ddf19b9c4d9408f0dfb0e9e141eeb3cffec4fd285017f913b8f624a7aa1316c228928abb95832aabea43712507f4f644cf59e757bc8 SHA512 29287637e8c2e40666c6cca054622f894a132925d532017c0f3144573757cce50f85dcc356f48b335dee7115627ff249b287ad821075835314dce0dfbc733b8a
DIST llvm-project-6f2e1a120ebb75da9b3fe6afb19231aa0f801a34.tar.gz 270304465 BLAKE2B 43bca1c7f0996febbf3e840375f6b91d18a83e197890fbb19724a217e772b111ca33b15098b969cb74797dd67ca81b23b8ca36b35f084f6252e3a4b38e431c82 SHA512 28cf27b9f65b8525ba30bbfda6765b14bd5db8c5c88ef711fee408b691dd2b9e373db99f4862e76d692571ebf4e746cd9495ad6c8248e07e9b574cee066a20da
DIST llvm-project-99457c368586b1debf49f55b3a0684317f5f298d.tar.gz 269907211 BLAKE2B aae5040ece1fa0eacd32468feee9896d614b7e91044ef504df2c80fc57fb42d2db162f01cfdd9c91c7e80fb9fa109440b6887451c96227f47308eb99d9249ef9 SHA512 0e865b56b8f3bf3f7e0fb9a5dfaa97b7d82c915e14474d07d7c036641f68727f2a81179110e3a1c3b424e0233d55589c568fcde2a98aec3a0882ab3a45c62e6c
@@ -0,0 +1,177 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
inherit cmake-multilib crossdev flag-o-matic llvm.org python-single-r1
inherit toolchain-funcs
DESCRIPTION="OpenMP runtime libraries for LLVM/clang compiler"
HOMEPAGE="https://openmp.llvm.org"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0/${LLVM_SOABI}"
IUSE="
+clang +debug gdb-plugin hwloc offload ompt test
cuda level-zero rocm
"
REQUIRED_USE="
gdb-plugin? ( ${PYTHON_REQUIRED_USE} )
"
RESTRICT="!test? ( test )"
DEPEND="
hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
offload? (
dev-libs/libffi:=
~llvm-core/llvm-${PV}
level-zero? ( dev-libs/level-zero:= )
rocm? ( dev-libs/rocr-runtime:= )
)
"
# tests:
# - dev-python/lit provides the test runner
# - llvm-core/llvm provide test utils (e.g. FileCheck)
# - llvm-core/clang provides the compiler to run tests
RDEPEND="
${DEPEND}
gdb-plugin? ( ${PYTHON_DEPS} )
offload? (
!llvm-runtimes/offload
cuda? ( ~llvm-runtimes/openmp-nvptx64-nvidia-cuda-${PV} )
level-zero? ( ~llvm-runtimes/openmp-spirv64-intel-${PV} )
rocm? ( ~llvm-runtimes/openmp-amdgcn-amd-amdhsa-${PV} )
)
"
BDEPEND="
dev-lang/perl
clang? ( llvm-core/clang )
gdb-plugin? ( ${PYTHON_DEPS} )
offload? (
virtual/pkgconfig
)
test? (
${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/lit[${PYTHON_USEDEP}]
')
llvm-core/clang:${LLVM_MAJOR}
llvm-core/llvm:${LLVM_MAJOR}
)
"
LLVM_COMPONENTS=(
runtimes openmp offload cmake libc llvm/{cmake,include,utils}
third-party/unittest
)
llvm.org_set_globals
MULTILIB_WRAPPED_HEADERS=(
/usr/include/offload/OffloadPrint.hpp
/usr/include/offload/OffloadAPI.h
)
pkg_pretend() {
if [[ ${LLVM_ALLOW_GPU_TESTING} ]]; then
ewarn "LLVM_ALLOW_GPU_TESTING set. This package will run tests against your"
ewarn "GPU if it is supported. Note that these tests may be flaky, fail or"
ewarn "hang, or even cause your GPU to crash (requiring a reboot)."
fi
}
pkg_setup() {
if use gdb-plugin || use test; then
python-single-r1_pkg_setup
fi
}
multilib_src_configure() {
if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
local -x CC=${CHOST}-clang
local -x CXX=${CHOST}-clang++
fi
strip-unsupported-flags
fi
# LTO causes issues in other packages building, #870127
filter-lto
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
local libdir="$(get_libdir)"
local mycmakeargs=(
-DLLVM_ENABLE_RUNTIMES=openmp
-DLLVM_LIBDIR_SUFFIX="${libdir#lib}"
-DLLVM_BINARY_DIR="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}"
-DLIBOMP_USE_HWLOC=$(usex hwloc)
-DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin)
-DLIBOMP_OMPT_SUPPORT=$(usex ompt)
# do not install libgomp.so & libiomp5.so aliases
-DLIBOMP_INSTALL_ALIASES=OFF
# disable unnecessary hack copying stuff back to srcdir
-DLIBOMP_COPY_EXPORTS=OFF
# this breaks building static target libs
-DBUILD_SHARED_LIBS=OFF
)
if multilib_is_native_abi && use offload; then
local ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
local ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
local plugins="host"
if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
if use rocm; then
plugins+=";amdgpu"
fi
if use cuda; then
plugins+=";cuda"
fi
if use level-zero; then
plugins+=";level_zero"
fi
fi
mycmakeargs+=(
-DLLVM_ENABLE_RUNTIMES="openmp;offload"
-DOFFLOAD_INCLUDE_TESTS=$(usex test)
-DLIBOMPTARGET_PLUGINS_TO_BUILD="${plugins}"
-DLIBOMPTARGET_OMPT_SUPPORT="$(usex ompt)"
)
[[ ! ${LLVM_ALLOW_GPU_TESTING} ]] && mycmakeargs+=(
# prevent trying to access the GPU
-DLIBOMPTARGET_AMDGPU_ARCH=LIBOMPTARGET_AMDGPU_ARCH-NOTFOUND
-DLIBOMPTARGET_NVPTX_ARCH=LIBOMPTARGET_NVPTX_ARCH-NOTFOUND
-DLIBOMPTARGET_OFFLOAD_ARCH=LIBOMPTARGET_OFFLOAD_ARCH-NOTFOUND
)
fi
use test && mycmakeargs+=(
-DLLVM_LIT_ARGS="$(get_lit_flags)"
-DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang-${LLVM_MAJOR}")"
-DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++-${LLVM_MAJOR}")"
# disable Fortran tests for now
# (TODO: enable where we have flang keyworded)
-DOPENMP_TEST_Fortran_COMPILER=
)
cmake_src_configure
}
multilib_src_test() {
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
local targets=( check-openmp )
if multilib_is_native_abi && use offload; then
targets+=( check-offload check-offload-unit )
fi
cmake_build "${targets[@]}"
}