llvm-runtimes/openmp: Enable Fortran tests

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2026-09-17 13:21:11 +02:00
parent 67adf25d28
commit 3fdb3b44cd

View File

@@ -113,6 +113,8 @@ multilib_src_configure() {
if use fortran; then
local -x FC=flang-${LLVM_MAJOR} F77=flang-${LLVM_MAJOR}
strip-unsupported-flags
else
local -x FC= F77=
fi
# LTO causes issues in other packages building, #870127
@@ -186,9 +188,8 @@ multilib_src_configure() {
-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=
# may be set to empty above
-DOPENMP_TEST_Fortran_COMPILER="${FC}"
)
cmake_src_configure
}
@@ -201,5 +202,12 @@ multilib_src_test() {
targets+=( check-offload check-offload-unit )
fi
if use fortran; then
# hack header search around by copying the modules to a directory
# that is already given via -I
cp "${BUILD_DIR}/$(get_libdir)/clang"/*/finclude/flang/*/*.mod \
"${WORKDIR}/offload/test/" || die
fi
cmake_build "${targets[@]}"
}