mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
llvm-core/flang: Add 21.0.0_pre20250215 snapshot
Closes: https://bugs.gentoo.org/748087 Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
1
llvm-core/flang/Manifest
Normal file
1
llvm-core/flang/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST llvm-project-c30a7f459452d5766da244564bc1d5888346c364.tar.gz 227560986 BLAKE2B c1c833aa6d488530826d96db81ca8be2fcf842ccf5b10a65ff18269fdfa32fa2742fb0a547eb315c2a9ee383e1b6b6cce4a78136e1740e04d322c79fb6a66a86 SHA512 0b68d3462e5eac89f50cff5e64603758ab74c701ff2de88c8569dd45b7e702b5d13b26c2745615c0c355d46d13765f47e4d43e61cde735240c6f386c0090becb
|
||||
72
llvm-core/flang/flang-21.0.0_pre20250215.ebuild
Normal file
72
llvm-core/flang/flang-21.0.0_pre20250215.ebuild
Normal file
@@ -0,0 +1,72 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake llvm.org
|
||||
|
||||
DESCRIPTION="LLVM's Fortran frontend"
|
||||
HOMEPAGE="https://flang.llvm.org/"
|
||||
|
||||
LICENSE="Apache-2.0-with-LLVM-exceptions"
|
||||
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
|
||||
IUSE="+debug test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="
|
||||
~llvm-core/clang-${PV}[debug=]
|
||||
~llvm-core/llvm-${PV}[debug=]
|
||||
~llvm-core/mlir-${PV}[debug=]
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/lit
|
||||
)
|
||||
"
|
||||
|
||||
LLVM_COMPONENTS=( flang cmake )
|
||||
LLVM_TEST_COMPONENTS=( clang/test/Driver mlir/test/lib )
|
||||
llvm.org_set_globals
|
||||
|
||||
src_configure() {
|
||||
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
|
||||
|
||||
# TODO: always enable to obtain reproducible tools
|
||||
-DFLANG_INCLUDE_TESTS=$(usex test)
|
||||
)
|
||||
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
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
# move the runtime into 'lib' (sigh), until upstream resolves
|
||||
# libdir support: https://github.com/llvm/llvm-project/issues/127538
|
||||
mv "${ED}/usr/lib/llvm/${LLVM_MAJOR}"/{$(get_libdir),lib} || die
|
||||
}
|
||||
Reference in New Issue
Block a user