From 9ebeeae4f8e57b80cbe7a680ba791a4b315e27ca Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 25 Feb 2025 09:31:07 +0100 Subject: [PATCH 01/18] [Premerge] Add flang-rt --- .ci/compute-projects.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.ci/compute-projects.sh b/.ci/compute-projects.sh index 32baf26b4f0a0..804883f3b7b8b 100644 --- a/.ci/compute-projects.sh +++ b/.ci/compute-projects.sh @@ -32,6 +32,7 @@ function compute-projects-to-test() { # Flang is not stable in Windows CI at the moment if [[ $isForWindows == 0 ]]; then echo flang + echo flang-rt fi ;; clang) @@ -47,6 +48,7 @@ function compute-projects-to-test() { # Flang is not stable in Windows CI at the moment if [[ $isForWindows == 0 ]]; then echo flang + echo flang-rt fi ;; *) @@ -95,11 +97,16 @@ function add-dependencies() { compiler-rt|libc|openmp) echo clang lld ;; - flang|lldb|libclc) + lldb|libclc) for p in llvm clang; do echo $p done ;; + flang) + for p in llvm clang mlir flang-rt; do + echo $p + done + ;; lld|mlir|polly) echo llvm ;; From afada274c131de7961076462737b7bdb284647cd Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Fri, 28 Feb 2025 13:27:46 +0100 Subject: [PATCH 02/18] Don't change deps --- .ci/compute-projects.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.ci/compute-projects.sh b/.ci/compute-projects.sh index 804883f3b7b8b..51fcf54dd81af 100644 --- a/.ci/compute-projects.sh +++ b/.ci/compute-projects.sh @@ -97,16 +97,11 @@ function add-dependencies() { compiler-rt|libc|openmp) echo clang lld ;; - lldb|libclc) + flang|lldb|libclc) for p in llvm clang; do echo $p done ;; - flang) - for p in llvm clang mlir flang-rt; do - echo $p - done - ;; lld|mlir|polly) echo llvm ;; From 8345c19d06b971fccf95f2cf3ddca9431dd0f935 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Fri, 28 Feb 2025 13:52:41 +0100 Subject: [PATCH 03/18] flang-rt has dependencies --- .ci/compute-projects.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.ci/compute-projects.sh b/.ci/compute-projects.sh index 51fcf54dd81af..caee831a2c738 100644 --- a/.ci/compute-projects.sh +++ b/.ci/compute-projects.sh @@ -97,11 +97,21 @@ function add-dependencies() { compiler-rt|libc|openmp) echo clang lld ;; - flang|lldb|libclc) + lldb|libclc) for p in llvm clang; do echo $p done ;; + flang) + for p in llvm clang mlir; do + echo $p + done + ;; + flang-rt) + for p in llvm clang mlir flang; do + echo $p + done + ;; lld|mlir|polly) echo llvm ;; From da2a5394212b461a67c3e343818a6ff10f196900 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 4 Mar 2025 00:20:34 +0100 Subject: [PATCH 04/18] flang-rt is a runtime --- .ci/compute-projects.sh | 6 ++++-- .ci/generate-buildkite-pipeline-premerge | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.ci/compute-projects.sh b/.ci/compute-projects.sh index 51fcf54dd81af..2cfd330b00f5d 100644 --- a/.ci/compute-projects.sh +++ b/.ci/compute-projects.sh @@ -32,7 +32,6 @@ function compute-projects-to-test() { # Flang is not stable in Windows CI at the moment if [[ $isForWindows == 0 ]]; then echo flang - echo flang-rt fi ;; clang) @@ -48,7 +47,6 @@ function compute-projects-to-test() { # Flang is not stable in Windows CI at the moment if [[ $isForWindows == 0 ]]; then echo flang - echo flang-rt fi ;; *) @@ -67,6 +65,10 @@ function compute-runtimes-to-test() { echo $p done ;; + flang) + for p in flang-rt; do + echo $p + done *) # Nothing to do ;; diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e547afaeb722f..b0b0d60a8a138 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -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})) From a8a932310b4a562689f7a21ae6bcb9bfb57ce07a Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 4 Mar 2025 12:46:57 +0100 Subject: [PATCH 05/18] Fix syntax error --- .ci/compute-projects.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/compute-projects.sh b/.ci/compute-projects.sh index 026d0bb3a7cfb..088e75e72303d 100644 --- a/.ci/compute-projects.sh +++ b/.ci/compute-projects.sh @@ -69,6 +69,7 @@ function compute-runtimes-to-test() { for p in flang-rt; do echo $p done + ;; *) # Nothing to do ;; From a7b728cc33a14a48da8cbb27866f78948d547b99 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 4 Mar 2025 13:11:37 +0100 Subject: [PATCH 06/18] flang_runtime_amdgpu-offload --- offload/cmake/caches/AMDGPUBot.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offload/cmake/caches/AMDGPUBot.cmake b/offload/cmake/caches/AMDGPUBot.cmake index 521841166be82..0236f5f0b6987 100644 --- a/offload/cmake/caches/AMDGPUBot.cmake +++ b/offload/cmake/caches/AMDGPUBot.cmake @@ -10,7 +10,7 @@ set(CMAKE_C_COMPILER_LAUNCHER ccache CACHE STRING "") set(CMAKE_CXX_COMPILER_LAUNCHER ccache CACHE STRING "") set(LLVM_ENABLE_PROJECTS "clang;lld;mlir;flang" CACHE STRING "") -set(LLVM_ENABLE_RUNTIMES "compiler-rt;openmp;offload" CACHE STRING "") +set(LLVM_ENABLE_RUNTIMES "compiler-rt;openmp;offload;flang-rt" CACHE STRING "") set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "") set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "") From b0d0879ccecee3553479774f009a210a9939c8e7 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Wed, 5 Mar 2025 12:40:41 +0100 Subject: [PATCH 07/18] Pass Flang as Fortran compiler --- .ci/monolithic-linux.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index 55741bc831046..101aa1507ed12 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -82,9 +82,9 @@ if [[ "${runtimes}" != "" ]]; then exit 1 fi - echo "--- ninja install-clang" + echo "--- ninja install-clang install-flang" - ninja -C ${BUILD_DIR} install-clang install-clang-resource-headers + ninja -C ${BUILD_DIR} install-clang install-flang install-clang-resource-headers RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" INSTALL_DIR="${BUILD_DIR}/install" @@ -95,6 +95,8 @@ 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="${INSTALL_DIR}/bin/flang" \ + -D CMAKE_Fortran_COMPILER_WORKS=ON \ -D LLVM_ENABLE_RUNTIMES="${runtimes}" \ -D LIBCXX_CXX_ABI=libcxxabi \ -D CMAKE_BUILD_TYPE=RelWithDebInfo \ From e8b028a64a86964efafc3e1b8575ee997ea033df Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Wed, 5 Mar 2025 15:27:10 +0100 Subject: [PATCH 08/18] Minimal changes --- .ci/compute-projects.sh | 12 +----------- .ci/generate-buildkite-pipeline-premerge | 2 +- .ci/monolithic-linux.sh | 6 +++--- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.ci/compute-projects.sh b/.ci/compute-projects.sh index 088e75e72303d..c76aa33848a36 100644 --- a/.ci/compute-projects.sh +++ b/.ci/compute-projects.sh @@ -100,21 +100,11 @@ function add-dependencies() { compiler-rt|libc|openmp) echo clang lld ;; - lldb|libclc) + flang|lldb|libclc) for p in llvm clang; do echo $p done ;; - flang) - for p in llvm clang mlir; do - echo $p - done - ;; - flang-rt) - for p in llvm clang mlir flang; do - echo $p - done - ;; lld|mlir|polly) echo llvm ;; diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index b0b0d60a8a138..e547afaeb722f 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -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 flang-rt libc libclc lld lldb llvm mlir openmp polly pstl" +all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang 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})) diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index 101aa1507ed12..58906d32fe7c7 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -82,9 +82,9 @@ if [[ "${runtimes}" != "" ]]; then exit 1 fi - echo "--- ninja install-clang install-flang" + echo "--- ninja install-clang" - ninja -C ${BUILD_DIR} install-clang install-flang install-clang-resource-headers + ninja -C ${BUILD_DIR} install-clang install-clang-resource-headers RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" INSTALL_DIR="${BUILD_DIR}/install" @@ -95,7 +95,7 @@ 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="${INSTALL_DIR}/bin/flang" \ + -D CMAKE_Fortran_COMPILER="${BUILD_DIR}/bin/flang" \ -D CMAKE_Fortran_COMPILER_WORKS=ON \ -D LLVM_ENABLE_RUNTIMES="${runtimes}" \ -D LIBCXX_CXX_ABI=libcxxabi \ From 67809ce5d46bc2482bdf88771d418ad6f6916cbc Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Wed, 5 Mar 2025 16:33:03 +0100 Subject: [PATCH 09/18] Add change in flang/ to trigger pre-merge check --- flang/docs/F202X.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flang/docs/F202X.md b/flang/docs/F202X.md index c6b5c5926efcc..67ea7fd97449a 100644 --- a/flang/docs/F202X.md +++ b/flang/docs/F202X.md @@ -291,7 +291,7 @@ functions whose implementations have very low priority: `SPLIT` and `TOKENIZE`. and could and should have been implemented once in some Fortran utility library for those who need a slow tokenization facility rather than requiring implementations in each vendor's runtime support library with -all the extra cost and compatibilty risk that entails. +all the extra cost and compatibility risk that entails. `SPLIT` is worse -- not only could it, like `TOKENIZE`, have been supplied by a Fortran utility library rather than being From d2144a098d0e3cd40cb359f8bcdb575a7fd20092 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Wed, 5 Mar 2025 16:37:31 +0100 Subject: [PATCH 10/18] Undo unrelated change --- offload/cmake/caches/AMDGPUBot.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offload/cmake/caches/AMDGPUBot.cmake b/offload/cmake/caches/AMDGPUBot.cmake index 0236f5f0b6987..521841166be82 100644 --- a/offload/cmake/caches/AMDGPUBot.cmake +++ b/offload/cmake/caches/AMDGPUBot.cmake @@ -10,7 +10,7 @@ set(CMAKE_C_COMPILER_LAUNCHER ccache CACHE STRING "") set(CMAKE_CXX_COMPILER_LAUNCHER ccache CACHE STRING "") set(LLVM_ENABLE_PROJECTS "clang;lld;mlir;flang" CACHE STRING "") -set(LLVM_ENABLE_RUNTIMES "compiler-rt;openmp;offload;flang-rt" CACHE STRING "") +set(LLVM_ENABLE_RUNTIMES "compiler-rt;openmp;offload" CACHE STRING "") set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "") set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "") From 26bb93a3f668b20c739ff1a84337a5ca541d68f3 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Wed, 5 Mar 2025 16:46:04 +0100 Subject: [PATCH 11/18] Set FLANG_ENABLE_FLANG_RT=OFF --- .ci/monolithic-linux.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index 58906d32fe7c7..5d237fc11f544 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -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" From 6e7d7fdf5b4290f706cb5d1b3bc14c627a214635 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Wed, 5 Mar 2025 17:28:18 +0100 Subject: [PATCH 12/18] Pass LLVM_BINARY_DIR required for testing --- .ci/monolithic-linux.sh | 1 + .ci/monolithic-local.sh | 127 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 .ci/monolithic-local.sh diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index 5d237fc11f544..0492f7d4650da 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -98,6 +98,7 @@ if [[ "${runtimes}" != "" ]]; then -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 \ diff --git a/.ci/monolithic-local.sh b/.ci/monolithic-local.sh new file mode 100644 index 0000000000000..2887c99bf41de --- /dev/null +++ b/.ci/monolithic-local.sh @@ -0,0 +1,127 @@ +#!/usr/bin/env bash + +set -eu +set -o pipefail + +SCRIPTDIR=$(realpath $(dirname $0)) +cd "${SCRIPTDIR}/.." + +# Environment variables script works with: + +# Set by buildkite +BUILDKITE_PULL_REQUEST_BASE_BRANCH=main^^ +BUILDKITE_COMMIT=main +BUILDKITE_BRANCH=test +# Fetch origin to have an up to date merge base for the diff. +git fetch origin +# List of files affected by this commit +: ${MODIFIED_FILES:=$(git diff --name-only origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH}...HEAD)} +# Filter rules for generic windows tests +: ${WINDOWS_AGENTS:='{"queue": "windows"}'} +# Filter rules for generic linux tests +: ${LINUX_AGENTS:='{"queue": "linux"}'} + +reviewID="$(git log --format=%B -n 1 | sed -nE 's/^Review-ID:[[:space:]]*(.+)$/\1/p')" +if [[ "${reviewID}" != "" ]]; then + buildMessage="https://llvm.org/${reviewID}" +else + buildMessage="Push to branch ${BUILDKITE_BRANCH}" +fi + +cat <&2 +echo "$MODIFIED_FILES" >&2 +modified_dirs=$(echo "$MODIFIED_FILES" | cut -d'/' -f1 | sort -u) +echo "Directories modified:" >&2 +echo "$modified_dirs" >&2 + +. ./.ci/compute-projects.sh + +# Project specific pipelines. + +# If libc++ or one of the runtimes directories changed. +if echo "$modified_dirs" | grep -q -E "^(libcxx|libcxxabi|libunwind|runtimes|cmake)$"; then + cat < Date: Wed, 5 Mar 2025 21:18:25 +0100 Subject: [PATCH 13/18] Adjust all runtime build configurations --- .ci/monolithic-linux.sh | 6 ++ .ci/monolithic-local.sh | 127 ---------------------------------------- 2 files changed, 6 insertions(+), 127 deletions(-) delete mode 100644 .ci/monolithic-local.sh diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index 0492f7d4650da..157dee22ace7c 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -117,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 \ @@ -135,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 \ diff --git a/.ci/monolithic-local.sh b/.ci/monolithic-local.sh deleted file mode 100644 index 2887c99bf41de..0000000000000 --- a/.ci/monolithic-local.sh +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/env bash - -set -eu -set -o pipefail - -SCRIPTDIR=$(realpath $(dirname $0)) -cd "${SCRIPTDIR}/.." - -# Environment variables script works with: - -# Set by buildkite -BUILDKITE_PULL_REQUEST_BASE_BRANCH=main^^ -BUILDKITE_COMMIT=main -BUILDKITE_BRANCH=test -# Fetch origin to have an up to date merge base for the diff. -git fetch origin -# List of files affected by this commit -: ${MODIFIED_FILES:=$(git diff --name-only origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH}...HEAD)} -# Filter rules for generic windows tests -: ${WINDOWS_AGENTS:='{"queue": "windows"}'} -# Filter rules for generic linux tests -: ${LINUX_AGENTS:='{"queue": "linux"}'} - -reviewID="$(git log --format=%B -n 1 | sed -nE 's/^Review-ID:[[:space:]]*(.+)$/\1/p')" -if [[ "${reviewID}" != "" ]]; then - buildMessage="https://llvm.org/${reviewID}" -else - buildMessage="Push to branch ${BUILDKITE_BRANCH}" -fi - -cat <&2 -echo "$MODIFIED_FILES" >&2 -modified_dirs=$(echo "$MODIFIED_FILES" | cut -d'/' -f1 | sort -u) -echo "Directories modified:" >&2 -echo "$modified_dirs" >&2 - -. ./.ci/compute-projects.sh - -# Project specific pipelines. - -# If libc++ or one of the runtimes directories changed. -if echo "$modified_dirs" | grep -q -E "^(libcxx|libcxxabi|libunwind|runtimes|cmake)$"; then - cat < Date: Thu, 6 Mar 2025 15:58:31 +0100 Subject: [PATCH 14/18] Trigger build of Flang when flang-rt is changed --- .ci/compute-projects.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.ci/compute-projects.sh b/.ci/compute-projects.sh index c76aa33848a36..e516655fed4d1 100644 --- a/.ci/compute-projects.sh +++ b/.ci/compute-projects.sh @@ -49,6 +49,13 @@ function compute-projects-to-test() { echo flang fi ;; + flang-rt) + # Flang-RT will be built whenever Flang is built + # Flang is not stable in Windows CI at the moment + if [[ $isForWindows == 0 ]]; then + echo flang + fi + ;; *) # Nothing to do ;; From 637f662786207b731980bf0499e6df8defbd7e3b Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 6 Mar 2025 16:01:59 +0100 Subject: [PATCH 15/18] Test change in flang-rt to trigger flang compilation --- flang-rt/README.md | 2 +- flang/docs/F202X.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flang-rt/README.md b/flang-rt/README.md index d79ddcaf20639..449546cef9748 100644 --- a/flang-rt/README.md +++ b/flang-rt/README.md @@ -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. diff --git a/flang/docs/F202X.md b/flang/docs/F202X.md index 67ea7fd97449a..c6b5c5926efcc 100644 --- a/flang/docs/F202X.md +++ b/flang/docs/F202X.md @@ -291,7 +291,7 @@ functions whose implementations have very low priority: `SPLIT` and `TOKENIZE`. and could and should have been implemented once in some Fortran utility library for those who need a slow tokenization facility rather than requiring implementations in each vendor's runtime support library with -all the extra cost and compatibility risk that entails. +all the extra cost and compatibilty risk that entails. `SPLIT` is worse -- not only could it, like `TOKENIZE`, have been supplied by a Fortran utility library rather than being From 881b6bfab53940ee162dac8282fccdf531f79c44 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 6 Mar 2025 16:06:39 +0100 Subject: [PATCH 16/18] Consider changes in flang-rt --- .ci/generate-buildkite-pipeline-premerge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e547afaeb722f..b0b0d60a8a138 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -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})) From 3d95f2e8a987e16e7abc739441f61da871d0d45f Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 6 Mar 2025 16:15:07 +0100 Subject: [PATCH 17/18] Exclude flang-rt from LLVM_ENABLE_PROJECTS --- .ci/compute-projects.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.ci/compute-projects.sh b/.ci/compute-projects.sh index e516655fed4d1..7135584d169e4 100644 --- a/.ci/compute-projects.sh +++ b/.ci/compute-projects.sh @@ -43,14 +43,7 @@ function compute-projects-to-test() { clang-tools-extra) echo libc ;; - mlir) - # Flang is not stable in Windows CI at the moment - if [[ $isForWindows == 0 ]]; then - echo flang - fi - ;; - flang-rt) - # Flang-RT will be built whenever Flang is built + mlir|flang-rt) # Flang is not stable in Windows CI at the moment if [[ $isForWindows == 0 ]]; then echo flang @@ -128,6 +121,7 @@ function exclude-linux() { case ${project} in cross-project-tests) ;; # tests failing openmp) ;; # https://github.com/google/llvm-premerge-checks/issues/410 + flang-rt) ;; # added to runtimes build, not LLVM_ENABLE_PROJECTS *) echo "${project}" ;; From b2354ffc924289ac0cbf59d53b498c121da4bd22 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 6 Mar 2025 23:37:11 +0100 Subject: [PATCH 18/18] Do not add flang-rt to projects-to-test in the first place --- .ci/compute-projects.sh | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.ci/compute-projects.sh b/.ci/compute-projects.sh index 7135584d169e4..6e7d32f2e2c12 100644 --- a/.ci/compute-projects.sh +++ b/.ci/compute-projects.sh @@ -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 ;; - mlir|flang-rt) + 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 @@ -121,7 +129,6 @@ function exclude-linux() { case ${project} in cross-project-tests) ;; # tests failing openmp) ;; # https://github.com/google/llvm-premerge-checks/issues/410 - flang-rt) ;; # added to runtimes build, not LLVM_ENABLE_PROJECTS *) echo "${project}" ;;