mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-21 13:36:50 +00:00
[Premerge] Add flang-rt (#128678)
Flang's runtime can now be built using LLVM's LLVM_ENABLE_RUNTIMES mechanism, with the intent to remove the old mechanism in #124126. Update the pre-merge builders to use the new mechanism. In the current form, #124126 actually will add LLVM_ENABLE_RUNTIMES=flang-rt implicitly, so no change is strictly needed. I still think it is a good idea to do it explicitly and in advance. On Windows, flang-rt also requires compiler-rt, but which is not building on Windows anyway.
This commit is contained in:
parent
786e70ff10
commit
95d28fe503
@ -18,15 +18,14 @@ function compute-projects-to-test() {
|
||||
shift
|
||||
projects=${@}
|
||||
for project in ${projects}; do
|
||||
echo "${project}"
|
||||
case ${project} in
|
||||
lld)
|
||||
for p in bolt cross-project-tests; do
|
||||
for p in lld bolt cross-project-tests; do
|
||||
echo $p
|
||||
done
|
||||
;;
|
||||
llvm)
|
||||
for p in bolt clang clang-tools-extra lld lldb mlir polly; do
|
||||
for p in llvm bolt clang clang-tools-extra lld lldb mlir polly; do
|
||||
echo $p
|
||||
done
|
||||
# Flang is not stable in Windows CI at the moment
|
||||
@ -36,21 +35,30 @@ function compute-projects-to-test() {
|
||||
;;
|
||||
clang)
|
||||
# lldb is temporarily removed to alleviate Linux pre-commit CI waiting times
|
||||
for p in clang-tools-extra compiler-rt cross-project-tests; do
|
||||
for p in clang clang-tools-extra compiler-rt cross-project-tests; do
|
||||
echo $p
|
||||
done
|
||||
;;
|
||||
clang-tools-extra)
|
||||
echo libc
|
||||
for p in clang-tools-extra libc; do
|
||||
echo $p
|
||||
done
|
||||
;;
|
||||
mlir)
|
||||
echo mlir
|
||||
# Flang is not stable in Windows CI at the moment
|
||||
if [[ $isForWindows == 0 ]]; then
|
||||
echo flang
|
||||
fi
|
||||
;;
|
||||
flang-rt)
|
||||
# Flang is not stable in Windows CI at the moment
|
||||
if [[ $isForWindows == 0 ]]; then
|
||||
echo flang
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# Nothing to do
|
||||
echo "${project}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@ -65,6 +73,11 @@ function compute-runtimes-to-test() {
|
||||
echo $p
|
||||
done
|
||||
;;
|
||||
flang)
|
||||
for p in flang-rt; do
|
||||
echo $p
|
||||
done
|
||||
;;
|
||||
*)
|
||||
# Nothing to do
|
||||
;;
|
||||
|
@ -73,7 +73,7 @@ fi
|
||||
# needs while letting them run on the infrastructure provided by LLVM.
|
||||
|
||||
# Figure out which projects need to be built on each platform
|
||||
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
|
||||
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang flang-rt libc libclc lld lldb llvm mlir openmp polly pstl"
|
||||
modified_projects="$(keep-modified-projects ${all_projects})"
|
||||
|
||||
linux_projects_to_test=$(exclude-linux $(compute-projects-to-test 0 ${modified_projects}))
|
||||
|
@ -65,6 +65,7 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
|
||||
-D CMAKE_CXX_FLAGS=-gmlt \
|
||||
-D LLVM_CCACHE_BUILD=ON \
|
||||
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
|
||||
-D FLANG_ENABLE_FLANG_RT=OFF \
|
||||
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
|
||||
|
||||
echo "--- ninja"
|
||||
@ -95,6 +96,9 @@ if [[ "${runtimes}" != "" ]]; then
|
||||
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
|
||||
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
|
||||
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
|
||||
-D CMAKE_Fortran_COMPILER="${BUILD_DIR}/bin/flang" \
|
||||
-D CMAKE_Fortran_COMPILER_WORKS=ON \
|
||||
-D LLVM_BINARY_DIR="${BUILD_DIR}" \
|
||||
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
|
||||
-D LIBCXX_CXX_ABI=libcxxabi \
|
||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
@ -113,6 +117,9 @@ if [[ "${runtimes}" != "" ]]; then
|
||||
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
|
||||
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
|
||||
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
|
||||
-D CMAKE_Fortran_COMPILER="${BUILD_DIR}/bin/flang" \
|
||||
-D CMAKE_Fortran_COMPILER_WORKS=ON \
|
||||
-D LLVM_BINARY_DIR="${BUILD_DIR}" \
|
||||
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
|
||||
-D LIBCXX_CXX_ABI=libcxxabi \
|
||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
@ -131,6 +138,9 @@ if [[ "${runtimes}" != "" ]]; then
|
||||
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
|
||||
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
|
||||
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
|
||||
-D CMAKE_Fortran_COMPILER="${BUILD_DIR}/bin/flang" \
|
||||
-D CMAKE_Fortran_COMPILER_WORKS=ON \
|
||||
-D LLVM_BINARY_DIR="${BUILD_DIR}" \
|
||||
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
|
||||
-D LIBCXX_CXX_ABI=libcxxabi \
|
||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
|
@ -124,7 +124,7 @@ $ ninja install
|
||||
|
||||
## Configuration Option Reference
|
||||
|
||||
Flang-RT has the followign configuration options. This is in
|
||||
Flang-RT has the following configuration options. This is in
|
||||
addition to the build options the LLVM_ENABLE_RUNTIMES mechanism and
|
||||
CMake itself provide.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user