llvm-core/flang: Add 22.0.0_pre20251022 snapshot

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2025-10-22 21:05:45 +02:00
parent d9c2dd169d
commit 30c079c19b
2 changed files with 102 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
DIST llvm-project-21.1.4.src.tar.xz 158939036 BLAKE2B b87eff4e3cb881d86aafcfdb46d85344ad6ae92d5c1e72c05282f375b4b11844756d0e6b4d0da5e522a348170a5da9842917737e272b758d8dde7e1fb2bee135 SHA512 a8c0883abe7c5a3e55ca7ed0fd974fae4351184a0b0df18295a982ca8ddb0f8d167353564204ed00f0cd9a1d8baef7074c0b39a99e0b5c52ced6bbee73dde3da
DIST llvm-project-21.1.4.src.tar.xz.sig 119 BLAKE2B c74a56448ad3e325234fcbe7d62ea888831e1e7696afb5aa5a185ea76a0880abe2d755f9e69a07760bbf9380534c3bb96c920ed6359ffd0f5f51c962d1494dcf SHA512 4812c2e3861aa3b726d842c3ca259b19ef1aa531fed9f6f47099483de91de2b2a165f40d243f6f40f2eea749741d5f8b7090f394399c56db02053f308921077a
DIST llvm-project-57a8599d14d4685487064e8b8a5c748970daa4d6.tar.gz 250938364 BLAKE2B 793d84c9716cb392667f84005048d549c96cbdbe666b52025c4f3fbd59d47d0b8b1d2485fe5ea52dfb67b6617e97b17197b208dc0d6744468475e459d0193b6d SHA512 06a2dfd70fc7a0bc772a67cc2eb5fe25cf5a170a3e0e07dfa284aaf5f4d90337a66ff026843c7798ed6bbdca84aa42428a9a9caf7ceba354665d2cd811ae84e6
DIST llvm-project-6a0e5b2fd7c340a872ae1e011cfb9de0d188feba.tar.gz 249848364 BLAKE2B 5d8eadfd43e1a131d7c061968c7d306b0537c0983c9366973d5b8d1bab4b384d1319604e12f097e235e077aefcd8b9c8395c3e16b53612f9f06fb11ba358aad6 SHA512 d931218ca1dafab09525f862f4b993cb6dde2f8738092e84b87542318d05c81fd41499098833f8629501c19f4fa741a35fc6447631f1c8830b2bb0b2cb64cc43

View File

@@ -0,0 +1,101 @@
# 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 flag-o-matic llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="LLVM's Fortran frontend"
HOMEPAGE="https://flang.llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
IUSE="+clang +debug test"
RESTRICT="!test? ( test )"
DEPEND="
~llvm-core/clang-${PV}[debug=]
~llvm-core/llvm-${PV}[debug=]
~llvm-core/mlir-${PV}[debug=]
"
RDEPEND="
${DEPEND}
"
PDEPEND="
>=llvm-runtimes/flang-rt-${PV}:${LLVM_MAJOR}
"
BDEPEND="
clang? ( llvm-core/clang )
test? (
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
)
"
LLVM_COMPONENTS=( flang cmake )
LLVM_TEST_COMPONENTS=( clang/test/Driver mlir/test/lib )
LLVM_USE_TARGETS=llvm+eq
llvm.org_set_globals
python_check_deps() {
python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
}
pkg_pretend() {
if ! use clang && tc-is-gcc; then
ewarn "Building using GCC requires lots of memory (up to 10 GiB per process)."
ewarn "Consider enabling USE=clang."
ewarn "See https://gcc.gnu.org/PR119705"
fi
}
pkg_setup() {
use test && python-any-r1_pkg_setup
}
src_configure() {
if use clang; 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
local mycmakeargs=(
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DLLVM_ROOT="${ESYSROOT}/usr/lib/llvm/${LLVM_MAJOR}"
-DCLANG_RESOURCE_DIR="../../../clang/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=OFF
-DMLIR_LINK_MLIR_DYLIB=ON
# flang does not feature a dylib, so do not install libraries
# or headers
-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON
# installed by llvm-runtimes/flang-rt
-DFLANG_INCLUDE_RUNTIME=OFF
# TODO: always enable to obtain reproducible tools
-DFLANG_INCLUDE_TESTS=$(usex test)
-DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
)
use test && mycmakeargs+=(
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
)
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
cmake_src_configure
}
src_test() {
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
cmake_build check-flang
}