mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-05 14:07:27 -08:00
llvm-runtimes/offload: Add 21.0.0_pre20250329 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
parent
cc5075ba87
commit
a5931ecc39
@ -4,3 +4,4 @@ DIST llvm-project-1c3a9a853ce68c3c539e7cab21380b9d8b18f426.tar.gz 229448743 BLAK
|
||||
DIST llvm-project-1d133420dc512487e2be0e9d86755f2a7c3497a7.tar.gz 229268288 BLAKE2B aca79bcca631deeab429a03cd2732d78d8ecf0c9615bce181445ed875436806609dc85a57d4f97109492833d620d060ea93fed450a4912c2d94597aeabf84974 SHA512 24ecadfccdf785bfbf27d5007afd2a4d5868493b2c5f48d6cf07c335bfbfef5cba4f12a639971e5f95877ae3b8c7b7fc0c210e404d21036af553de82a5059037
|
||||
DIST llvm-project-20.1.1.src.tar.xz 147215020 BLAKE2B d1774d060036b5340f765d68cc23cbd1e00730874cb3e65b7236303238d7922a7fa191b631c20c3bf17e54c933672a355d4424f2beea17cd25fcf9f5c4c625dd SHA512 b851d3e24a2775f6e789720614a8192d72956f447a39d75e5160a8acf6bd3a3386fab2cca5590b7e020b65e408ccf32432f8dc03519fd4cf60b4b5674fe0547e
|
||||
DIST llvm-project-20.1.1.src.tar.xz.sig 566 BLAKE2B 76c49401d9b8e283fc29586c32fc1b5205d76b3b83d0f99aa2ac09a63b058478e08588dcfbfc728110172b639eeaf04a884f4e6d707b94cad0dbf2d0dcb30a4f SHA512 469b03f3ddbe56b074724375b09a45ee2730bee0ba4b25f64f93d93ef609c33d39136f051c216a74a35d98a70ffcd3d7507e38d19a20d5006c29a954ca32813b
|
||||
DIST llvm-project-21eeca3db0341fef4ab4a6464ffe38b2eba5810c.tar.gz 229546432 BLAKE2B e783f08b93498b252741a07fd3aa3383ca93f66688f9bbdb2e11185c660dfff1020ab4a1ca803ab69ab28dc2fd8b5c3855f45c0b77851b8e6edeb0dc5bf6cbd4 SHA512 54420956b36f3bccabea2171a4103ca20d6b136e1d1f7f217e0ec735be4542bbd840ef228c55f3e9103ad2f9fb41393e611d5aaa1521d01fdd163b770b80ba0b
|
||||
|
||||
139
llvm-runtimes/offload/offload-21.0.0_pre20250329.ebuild
Normal file
139
llvm-runtimes/offload/offload-21.0.0_pre20250329.ebuild
Normal file
@ -0,0 +1,139 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
inherit cmake llvm.org python-any-r1 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="+debug ompt test llvm_targets_AMDGPU llvm_targets_NVPTX"
|
||||
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
|
||||
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=( offload cmake runtimes/cmake libc )
|
||||
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() {
|
||||
# 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"
|
||||
local build_devicertl=FALSE
|
||||
|
||||
if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
|
||||
if use llvm_targets_AMDGPU; then
|
||||
plugins+=";amdgpu"
|
||||
build_devicertl=TRUE
|
||||
fi
|
||||
if use llvm_targets_NVPTX; then
|
||||
plugins+=";cuda"
|
||||
build_devicertl=TRUE
|
||||
fi
|
||||
fi
|
||||
|
||||
local mycmakeargs=(
|
||||
-DLLVM_ROOT="${ESYSROOT}/usr/lib/llvm/${LLVM_MAJOR}"
|
||||
|
||||
-DOFFLOAD_LIBDIR_SUFFIX="${libdir#lib}"
|
||||
-DLIBOMPTARGET_PLUGINS_TO_BUILD="${plugins}"
|
||||
-DLIBOMPTARGET_OMPT_SUPPORT="$(usex ompt)"
|
||||
-DLIBOMPTARGET_BUILD_DEVICERTL_BCLIB="${build_devicertl}"
|
||||
|
||||
# this breaks building static target libs
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
|
||||
-DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
|
||||
-DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
|
||||
)
|
||||
|
||||
[[ ! ${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
|
||||
|
||||
if [[ ${build_devicertl} == FALSE ]]; then
|
||||
# clang requires libomptarget.devicertl.a, but it can be empty
|
||||
> "${BUILD_DIR}"/libomptarget.devicertl.a || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# respect TMPDIR!
|
||||
local -x LIT_PRESERVES_TMP=1
|
||||
|
||||
cmake_build check-offload
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
if [[ ! -f ${ED}/usr/$(get_libdir)/libomptarget.devicertl.a ]]
|
||||
then
|
||||
dolib.a "${BUILD_DIR}"/libomptarget.devicertl.a
|
||||
fi
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user