mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-08 00:05:33 +03:00
llvm-runtimes/offload: Add 22.0.0_pre20251108 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
parent
90cb83d40e
commit
4d7048d879
@ -1,3 +1,4 @@
|
||||
DIST llvm-project-0875755f5275dc7a84b1aeb526b7822b47a733c9.tar.gz 254111698 BLAKE2B 16bd787e9af46837e6e2962d2f9bdd2a1d13b1ab6f4dcb1a428914cc2502b6430f79ee163b0d8ad5b6a9124162f262fa394265f8c52950100b543b7027df310c SHA512 de107dd50b078d9f7e0f838b3e439e2012d6e4e14fcdd2438de344a11dd6b2542ee1efd029067fddf05b8eb9d97786f214ff199d1b6aabfd2e3459f9840bc497
|
||||
DIST llvm-project-19.1.7.src.tar.xz 141249332 BLAKE2B 1259ed7f9aca7b35e89d818befdee20fd8bed4d2dc2c2c6f6f56451fd43d35ac03a0a5a406e142d22b25137999dc5b17471c196f8fcf79f20a8296832d900f6d SHA512 c7d63286d662707a9cd54758c9e3aaf52794a91900c484c4a6efa62d90bc719d5e7a345e4192feeb0c9fd11c82570d64677c781e5be1d645556b6aa018e47ec8
|
||||
DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf6f30e75705123d067ea97175d91d7a5b6a75008df01d99ae7aa16aaa3b101f3f41e38d01f04158f95a261d617b3ede0254cd SHA512 195797b06ac80a742e0ccbc03a50dc06dd2e04377d783d5474e3e72c5a75203b60292b047929312a411d22b137a239943fba414a4d136a2be14cbff978eb6bda
|
||||
DIST llvm-project-20.1.8.src.tar.xz 147242952 BLAKE2B 7657ac0b26acc5affb1bfc91b912ade3191c5d77f3979d5a80d5f6ce52f56a7d1c448bd257398390bf10838f02faa6f3ece37a7327cced69d165ec2e2e699316 SHA512 f330e72e6a1da468569049437cc0ba7a41abb816ccece7367189344f7ebfef730f4788ac7af2bef0aa8a49341c15ab1d31e941ffa782f264d11fe0dc05470773
|
||||
|
||||
138
llvm-runtimes/offload/offload-22.0.0_pre20251108.ebuild
Normal file
138
llvm-runtimes/offload/offload-22.0.0_pre20251108.ebuild
Normal file
@ -0,0 +1,138 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
inherit cmake crossdev flag-o-matic llvm.org python-any-r1
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="OpenMP offloading support"
|
||||
HOMEPAGE="https://openmp.llvm.org"
|
||||
|
||||
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
|
||||
SLOT="0/${LLVM_SOABI}"
|
||||
IUSE="+clang +debug ompt test llvm_targets_AMDGPU llvm_targets_NVPTX"
|
||||
REQUIRED_USE="
|
||||
llvm_targets_AMDGPU? ( clang )
|
||||
llvm_targets_NVPTX? ( clang )
|
||||
"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/libffi:=
|
||||
~llvm-core/llvm-${PV}
|
||||
~llvm-runtimes/openmp-${PV}[ompt?]
|
||||
llvm_targets_AMDGPU? ( dev-libs/rocr-runtime:= )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
# 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
|
||||
BDEPEND="
|
||||
dev-lang/perl
|
||||
virtual/pkgconfig
|
||||
clang? ( llvm-core/clang )
|
||||
llvm_targets_AMDGPU? ( llvm-core/clang[llvm_targets_AMDGPU] )
|
||||
llvm_targets_NVPTX? ( llvm-core/clang[llvm_targets_NVPTX] )
|
||||
test? (
|
||||
$(python_gen_any_dep '
|
||||
dev-python/lit[${PYTHON_USEDEP}]
|
||||
')
|
||||
llvm-core/clang
|
||||
)
|
||||
"
|
||||
|
||||
LLVM_COMPONENTS=( runtimes offload cmake libc llvm/{cmake,utils/llvm-lit} )
|
||||
LLVM_TEST_COMPONENTS=( openmp/cmake )
|
||||
llvm.org_set_globals
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
python_check_deps() {
|
||||
python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use test; then
|
||||
python-any-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
|
||||
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
|
||||
|
||||
local libdir="$(get_libdir)"
|
||||
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 llvm_targets_AMDGPU; then
|
||||
plugins+=";amdgpu"
|
||||
fi
|
||||
if use llvm_targets_NVPTX; then
|
||||
plugins+=";cuda"
|
||||
fi
|
||||
fi
|
||||
|
||||
local mycmakeargs=(
|
||||
-DLLVM_ENABLE_RUNTIMES=offload
|
||||
-DOPENMP_STANDALONE_BUILD=ON
|
||||
-DOFFLOAD_LIBDIR_SUFFIX="${libdir#lib}"
|
||||
-DLLVM_ROOT="${ESYSROOT}/usr/lib/llvm/${LLVM_MAJOR}"
|
||||
|
||||
-DOFFLOAD_INCLUDE_TESTS=$(usex test)
|
||||
-DLIBOMPTARGET_PLUGINS_TO_BUILD="${plugins}"
|
||||
-DLIBOMPTARGET_OMPT_SUPPORT="$(usex ompt)"
|
||||
|
||||
# this breaks building static target libs
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
)
|
||||
|
||||
[[ ! ${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
|
||||
)
|
||||
use test && mycmakeargs+=(
|
||||
# this project does not use standard LLVM cmake macros
|
||||
-DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
|
||||
-DOPENMP_LIT_ARGS="$(get_lit_flags)"
|
||||
|
||||
-DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
|
||||
-DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
|
||||
# requires flang
|
||||
-DOPENMP_TEST_Fortran_COMPILER=
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# respect TMPDIR!
|
||||
local -x LIT_PRESERVES_TMP=1
|
||||
|
||||
cmake_build check-offload check-offload-unit
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user