llvm-core/flang: Add 22.1.6

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2026-05-21 11:37:36 +02:00
parent 2498998660
commit 6efef4c2fe
2 changed files with 104 additions and 0 deletions
+2
View File
@@ -3,4 +3,6 @@ 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.5.src.tar.xz 167058820 BLAKE2B b0d4bc4db8d03a2201620dec0fcf5c946d86ac152c0feef4252e211eec4542e2fc849e2bafc8bcb57982959d005d70e9a7bd81296fed04f819b7de3f2fc15c43 SHA512 68de113906ec0c843a9346ecd06bff352146869f1f28b5600ff907125d77202692b6f68bd169bcd74ae5b82e0ad5548ea99c2405540abea36880d80e373744ff
DIST llvm-project-22.1.5.src.tar.xz.sig 119 BLAKE2B c756bb5d4ebc9fc3b61115495c75574312ad287dc4bdfc8408da7dcfc781f26c5804d8a4a46af32ad809db80a154aff6cad308742e1e04ca4a93249d6f1a55b4 SHA512 36baf347f79c26705136a7d342e8ee0a8a42939bb1db2d9ce91666b1edbbb04194ff63bc41899e4498cd819e6c2bd6944ea68d972e074e113f48d08e6544c368
DIST llvm-project-22.1.6.src.tar.xz 167043464 BLAKE2B 86b5f0da9ced0ffc6e2c765f4d2c1537000062bd1bbfa6d060e192251c8e28d253924e1a164e76edef3ec05fa4447a75d554bc89f6ea7e33c6792a1f5d67f3a6 SHA512 39ee3a66b92abe4eed5f9db086f6279faa72d8a3fe1beee8897da2dcc8b6982d169054b394995090c9cc6519f50a03a7fc465905dda3c61eb1063b9ba4696b0c
DIST llvm-project-22.1.6.src.tar.xz.sig 119 BLAKE2B faba6f95374bc9ffda950b7cb727246e3d05173a1b790f669722fe97aff5f5a7a840324b3f1721a424393e3dbf56d768868d65a1cfac107a49487e0111a8d87f SHA512 6aeaac226c3099ac1120e57daf9be4161855e17415df7117b9091a0c1a32022d27a842cdf208d17ee389b2be003577688565abbb18c78d94d56c3a38d56bb035
DIST llvm-project-8789401c6f0b2c53ba348860c1b0c5df1fa40c8c.tar.gz 271359638 BLAKE2B 31d1c91b535f129cac4b1da7ce2e6f0765231ebe6a5b1cb83f00d56d68820cdd029f7d2fdf602148e37bc9a22d99b71e25284eab74b8d52fa87ed4636712171f SHA512 4ca908b0b5d7ae9a2b334d033d2c11b557dcc3305b9107017965ae612716beade09a0c73e1a5f5eab1c9794728558d4a981715bb9b01d5ba2c2c5c6c53d1a9b6
+102
View File
@@ -0,0 +1,102 @@
# 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 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}"
KEYWORDS="~amd64 ~arm64"
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
}