[llvm] [orc-rt] Reorganize regression tests, add JIT'd code support (PR #226356)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 21:52:13 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r origin/main...HEAD orc-rt/test/regression/lit.cfg.py
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- lit.cfg.py	2026-09-25 04:45:00.000000 +0000
+++ lit.cfg.py	2026-09-25 04:51:38.445301 +0000
@@ -39,10 +39,11 @@
     config.available_features.add("llvm-jitlink")
     config.substitutions.append(
         ("%{jit}", "{} -oop-launch={}".format(llvm_jitlink, ogre))
     )
 
+
 # %{cc} and %{cxx} compile C and C++ for the runtime's target. They default to
 # clang and clang++ from the LLVM tools directory. Pass --param orc-rt-cc=<cc>
 # or --param orc-rt-cxx=<cxx> to use a different compiler: it must accept
 # clang-style options and target the runtime's target without being told to
 # (use a wrapper script if necessary). Tests that use %{cc} or %{cxx} must be
@@ -50,22 +51,21 @@
 def add_compiler(name, clang_name):
     override = lit_config.params.get(name)
     if override:
         compiler = lit.util.which(override)
         if compiler is None:
-            lit_config.fatal(
-                "{} compiler '{}' not found".format(name, override)
-            )
+            lit_config.fatal("{} compiler '{}' not found".format(name, override))
         lit_config.note("using {} override: {}".format(name, compiler))
     else:
         compiler = llvm_config.use_llvm_tool(clang_name)
         if compiler:
             compiler += " --target=" + config.target_triple
     if compiler:
         config.available_features.add(name)
-        substitution = "%{" + name[len("orc-rt-"):] + "}"
+        substitution = "%{" + name[len("orc-rt-") :] + "}"
         config.substitutions.append((substitution, compiler))
+
 
 add_compiler("orc-rt-cc", "clang")
 add_compiler("orc-rt-cxx", "clang++")
 
 # %{mc} assembles its input into an object file for the runtime's target.
@@ -85,19 +85,17 @@
 # Describe the runtime's target architecture and object format, so that object
 # format tests can gate on them:
 #   target-arch=<arch>             (arm64 and aarch64 are aliases)
 #   target-object-format=<coff|elf|mach-o>
 # No object format feature is added for targets not recognized below.
-ELF_OS_NAMES = ("linux", "freebsd", "netbsd", "openbsd", "fuchsia", "none",
-                "elf")
+ELF_OS_NAMES = ("linux", "freebsd", "netbsd", "openbsd", "fuchsia", "none", "elf")
+
 
 def add_target_features():
     arch, _, rest = config.target_triple.partition("-")
     if arch in ("arm64", "aarch64"):
-        config.available_features.update(
-            ["target-arch=arm64", "target-arch=aarch64"]
-        )
+        config.available_features.update(["target-arch=arm64", "target-arch=aarch64"])
     else:
         config.available_features.add("target-arch=" + arch)
     components = rest.split("-")
     if "apple" in components:
         object_format = "mach-o"
@@ -106,10 +104,11 @@
     elif any(c.startswith(n) for c in components for n in ELF_OS_NAMES):
         object_format = "elf"
     else:
         return
     config.available_features.add("target-object-format=" + object_format)
+
 
 add_target_features()
 
 
 def run_test_tool(name, *args):

``````````

</details>


https://github.com/llvm/llvm-project/pull/226356


More information about the llvm-commits mailing list