[llvm] [CI] Add flang-rt to pre-merge configuration (PR #156039)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 29 10:59:27 PDT 2025


https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/156039

>From 1ed2fbe39b23c32926f034bbc23b9ae7e95b2905 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov at redhat.com>
Date: Fri, 29 Aug 2025 16:48:02 +0200
Subject: [PATCH 1/2] [CI] Add flang-rt to pre-merge configuration

Currently if you modify something in flang-rt, no tests are run
at all.
---
 .ci/compute_projects.py      |  8 ++++++--
 .ci/compute_projects_test.py | 12 ++++++------
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index 95351c46fad59..3a5ab3f0c5412 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -26,6 +26,7 @@
     "libc": {"clang", "lld"},
     "openmp": {"clang", "lld"},
     "flang": {"llvm", "clang"},
+    "flang-rt": {"flang"},
     "lldb": {"llvm", "clang"},
     "libclc": {"llvm", "clang"},
     "lld": {"llvm"},
@@ -80,7 +81,8 @@
     "clang-tools-extra": {"libc"},
     "libc": {"libc"},
     "compiler-rt": {"compiler-rt"},
-    ".ci": {"compiler-rt", "libc"},
+    "flang-rt": {"flang-rt"},
+    ".ci": {"compiler-rt", "libc", "flang-rt"},
 }
 DEPENDENT_RUNTIMES_TO_TEST_NEEDS_RECONFIG = {
     "llvm": {"libcxx", "libcxxabi", "libunwind"},
@@ -103,6 +105,7 @@
     "libcxx",
     "libcxxabi",
     "libunwind",
+    "flang-rt",
 }
 
 # These are projects that we should test if the project itself is changed but
@@ -140,6 +143,7 @@
     "bolt": "check-bolt",
     "lld": "check-lld",
     "flang": "check-flang",
+    "flang-rt": "check-flang-rt",
     "libc": "check-libc",
     "lld": "check-lld",
     "lldb": "check-lldb",
@@ -148,7 +152,7 @@
     "polly": "check-polly",
 }
 
-RUNTIMES = {"libcxx", "libcxxabi", "libunwind", "compiler-rt", "libc"}
+RUNTIMES = {"libcxx", "libcxxabi", "libunwind", "compiler-rt", "libc", "flang-rt"}
 
 # Meta projects are projects that need explicit handling but do not reside
 # in their own top level folder. To add a meta project, the start of the path
diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py
index 7d780b51ca5d1..07ae520b97e22 100644
--- a/.ci/compute_projects_test.py
+++ b/.ci/compute_projects_test.py
@@ -293,11 +293,11 @@ def test_ci(self):
         )
         self.assertEqual(
             env_variables["runtimes_to_build"],
-            "compiler-rt;libc;libcxx;libcxxabi;libunwind",
+            "compiler-rt;flang-rt;libc;libcxx;libcxxabi;libunwind",
         )
         self.assertEqual(
             env_variables["runtimes_check_targets"],
-            "check-compiler-rt check-libc",
+            "check-compiler-rt check-flang-rt check-libc",
         )
         self.assertEqual(
             env_variables["runtimes_check_targets_needs_reconfig"],
@@ -367,11 +367,11 @@ def test_premerge_workflow(self):
         )
         self.assertEqual(
             env_variables["runtimes_to_build"],
-            "compiler-rt;libc;libcxx;libcxxabi;libunwind",
+            "compiler-rt;flang-rt;libc;libcxx;libcxxabi;libunwind",
         )
         self.assertEqual(
             env_variables["runtimes_check_targets"],
-            "check-compiler-rt check-libc",
+            "check-compiler-rt check-flang-rt check-libc",
         )
         self.assertEqual(
             env_variables["runtimes_check_targets_needs_reconfig"],
@@ -402,11 +402,11 @@ def test_third_party_benchmark(self):
         )
         self.assertEqual(
             env_variables["runtimes_to_build"],
-            "compiler-rt;libc;libcxx;libcxxabi;libunwind",
+            "compiler-rt;flang-rt;libc;libcxx;libcxxabi;libunwind",
         )
         self.assertEqual(
             env_variables["runtimes_check_targets"],
-            "check-compiler-rt check-libc",
+            "check-compiler-rt check-flang-rt check-libc",
         )
         self.assertEqual(
             env_variables["runtimes_check_targets_needs_reconfig"],

>From ea559311953b8368ccc76506c37e1e860bc4cb87 Mon Sep 17 00:00:00 2001
From: Nikita Popov <nikita.ppv at gmail.com>
Date: Fri, 29 Aug 2025 19:59:05 +0200
Subject: [PATCH 2/2] Also run flang-rt tests when changing flang

---
 .ci/compute_projects.py      | 1 +
 .ci/compute_projects_test.py | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index 3a5ab3f0c5412..1aa5f02b85e62 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -81,6 +81,7 @@
     "clang-tools-extra": {"libc"},
     "libc": {"libc"},
     "compiler-rt": {"compiler-rt"},
+    "flang": {"flang-rt"},
     "flang-rt": {"flang-rt"},
     ".ci": {"compiler-rt", "libc", "flang-rt"},
 }
diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py
index 07ae520b97e22..89e9f58a873b2 100644
--- a/.ci/compute_projects_test.py
+++ b/.ci/compute_projects_test.py
@@ -216,8 +216,8 @@ def test_flang(self):
         )
         self.assertEqual(env_variables["projects_to_build"], "clang;flang;llvm")
         self.assertEqual(env_variables["project_check_targets"], "check-flang")
-        self.assertEqual(env_variables["runtimes_to_build"], "")
-        self.assertEqual(env_variables["runtimes_check_targets"], "")
+        self.assertEqual(env_variables["runtimes_to_build"], "flang-rt")
+        self.assertEqual(env_variables["runtimes_check_targets"], "check-flang-rt")
         self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
         self.assertEqual(env_variables["enable_cir"], "OFF")
 



More information about the llvm-commits mailing list