diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2026-03-22 07:15:00 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2026-03-22 07:15:00 +0000 |
| commit | 753d8fe6b91c19e78c1d4657723d7742125e007a (patch) | |
| tree | 09aee0260996914b01254628ce0c469f1f4fe573 /llvm-runtimes/openmp | |
| parent | 64de8ac635b3c9ec719954364353db0d8277444a (diff) | |
| download | baldeagleos-repo-753d8fe6b91c19e78c1d4657723d7742125e007a.tar.gz baldeagleos-repo-753d8fe6b91c19e78c1d4657723d7742125e007a.tar.xz baldeagleos-repo-753d8fe6b91c19e78c1d4657723d7742125e007a.zip | |
Adding metadata
Diffstat (limited to 'llvm-runtimes/openmp')
| -rw-r--r-- | llvm-runtimes/openmp/Manifest | 1 | ||||
| -rw-r--r-- | llvm-runtimes/openmp/metadata.xml | 6 | ||||
| -rw-r--r-- | llvm-runtimes/openmp/openmp-23.0.0.9999.ebuild | 101 | ||||
| -rw-r--r-- | llvm-runtimes/openmp/openmp-23.0.0.9999.ebuild.orig | 176 | ||||
| -rw-r--r-- | llvm-runtimes/openmp/openmp-23.0.0_pre20260321.ebuild | 177 |
5 files changed, 452 insertions, 9 deletions
diff --git a/llvm-runtimes/openmp/Manifest b/llvm-runtimes/openmp/Manifest index 6e07815dc6e9..6c8e2f452a85 100644 --- a/llvm-runtimes/openmp/Manifest +++ b/llvm-runtimes/openmp/Manifest @@ -16,3 +16,4 @@ DIST llvm-project-22.1.0.src.tar.xz.sig 119 BLAKE2B d3190d9dbacedf9de0c6b3d5c771 DIST llvm-project-22.1.1.src.tar.xz 167029452 BLAKE2B 5d02e03ed943904e8e45d5a522ee37720540b80f79f449bdc50ac87c1703d0129aa853384a63782eabf8f6d375e123709d73167f9f708bde4e0118d10837f2b0 SHA512 dddf09651c0e77caa83284788765016b023a9e239cfe35820bab7be64b68218e86bcf39bb07ee14dcddf7b0974b551344d2bff0e109cc9458b0394a3c940917c DIST llvm-project-22.1.1.src.tar.xz.sig 119 BLAKE2B 02dd014936c4bac983ad6822a3ca084ddc94beeb4f4ccc6afae0031c7c563b10f7b962ef5a1a3d573330725c590f7e3b2eef2c21100063e68e32a1015b733c3d SHA512 592d603d610e121e7466a342bbf6b95c9a5f689268fad778befbf9e5663b53717c50daab9db07288020e3dcc2ec2bf38d611761a9ff6c3ce10a4340cfc2593c7 DIST llvm-project-704c87bb948aff1bec718d56ad52b9b5d9c49cfb.tar.gz 264313048 BLAKE2B 68a42c37c44be743f1b584e97fbc9633cb2f679d8b2a733c31eb1f6805591a3b817e5c41dcc2d5a7bcf399e822fab3b020f8f2126918ef2e96f7a231b2b2a08f SHA512 dbcbc3b988c60e9a9cd3a03c339d53722f3a854ff05c53f88a9dad2c52db16453a34bd481ce90d063eae93428e438cf397bc5c60194e14ca9c65b0459c2a91d7 +DIST llvm-project-df9eb79970c012990e829d174d181d575d414efe.tar.gz 265149781 BLAKE2B ab7a87dad369685fc26a054c065dee6ef2754b6446d5a6e15ed7f5bb52d7d433b519cac0522063ba222600f6f40dc40f7bf27930c74031cc40fff5372308a097 SHA512 7c63bf1360902e6a55c7f4c15d08a716d54476875744e6f40ec51157de6c18bf75d8fdb921f26831017151e87649bd1a48041e007edd9a0afc5e9f9066bfd79d diff --git a/llvm-runtimes/openmp/metadata.xml b/llvm-runtimes/openmp/metadata.xml index fa44a7062fc6..d581ad360c22 100644 --- a/llvm-runtimes/openmp/metadata.xml +++ b/llvm-runtimes/openmp/metadata.xml @@ -11,10 +11,16 @@ <longdescription>The OpenMP subproject of LLVM is intended to contain all of the components required to build an executing OpenMP program that are outside the compiler itself.</longdescription> <use> + <flag name="clang"> + Force building using installed clang (rather than + the default CC/CXX). + </flag> <flag name="gdb-plugin">Build OMPD GDB plugin</flag> <flag name="hwloc">Enable CPU affinity support via hwloc</flag> + <flag name="level-zero">Build <pkg>dev-libs/level-zero</pkg> offloading support for Intel GPUs.</flag> <flag name="offload">Support offloading OpenMP using libomptarget</flag> <flag name="ompt">Enable OpenMP Tools Interface support</flag> + <flag name="rocm">Build <pkg>dev-libs/rocr-runtime</pkg> offloading support for AMD GPUs.</flag> </use> <origin>gentoo-staging</origin> </pkgmetadata>
\ No newline at end of file diff --git a/llvm-runtimes/openmp/openmp-23.0.0.9999.ebuild b/llvm-runtimes/openmp/openmp-23.0.0.9999.ebuild index 9c4159090b08..b371ecf0ec67 100644 --- a/llvm-runtimes/openmp/openmp-23.0.0.9999.ebuild +++ b/llvm-runtimes/openmp/openmp-23.0.0.9999.ebuild @@ -4,32 +4,53 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..14} ) -inherit flag-o-matic cmake-multilib linux-info llvm.org python-single-r1 +inherit cmake-multilib crossdev flag-o-matic llvm.org python-single-r1 +inherit toolchain-funcs -DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" +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="+debug gdb-plugin hwloc ompt test" +IUSE=" + +clang +debug gdb-plugin hwloc offload ompt test + cuda level-zero rocm +" REQUIRED_USE=" gdb-plugin? ( ${PYTHON_REQUIRED_USE} ) " RESTRICT="!test? ( test )" -RDEPEND=" - gdb-plugin? ( ${PYTHON_DEPS} ) +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 -DEPEND=" - ${RDEPEND} +RDEPEND=" + ${DEPEND} + gdb-plugin? ( ${PYTHON_DEPS} ) + offload? ( + !llvm-core/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 ' @@ -41,11 +62,24 @@ BDEPEND=" " LLVM_COMPONENTS=( - runtimes openmp cmake llvm/{cmake,include,utils/llvm-lit} + runtimes openmp offload cmake libc llvm/{cmake,include,utils/llvm-lit} 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 @@ -53,6 +87,17 @@ pkg_setup() { } 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 @@ -73,8 +118,42 @@ multilib_src_configure() { -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}")" @@ -89,6 +168,10 @@ multilib_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 check-openmp + cmake_build "${targets[@]}" } diff --git a/llvm-runtimes/openmp/openmp-23.0.0.9999.ebuild.orig b/llvm-runtimes/openmp/openmp-23.0.0.9999.ebuild.orig new file mode 100644 index 000000000000..cdffa7b4eef5 --- /dev/null +++ b/llvm-runtimes/openmp/openmp-23.0.0.9999.ebuild.orig @@ -0,0 +1,176 @@ +# 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} +<<<<<<< HEAD + !llvm-runtimes/offload +======= +>>>>>>> 5e2e276073939 (llvm-runtimes/openmp: Include device runtime dependencies) + 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-core/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/llvm-lit} + third-party/unittest +) +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 +} + +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 check-openmp +} diff --git a/llvm-runtimes/openmp/openmp-23.0.0_pre20260321.ebuild b/llvm-runtimes/openmp/openmp-23.0.0_pre20260321.ebuild new file mode 100644 index 000000000000..b371ecf0ec67 --- /dev/null +++ b/llvm-runtimes/openmp/openmp-23.0.0_pre20260321.ebuild @@ -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_{10..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-core/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/llvm-lit} + 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[@]}" +} |
