[llvm] [orc-rt] Rename lit %{jit} substitution to %{obj-jit}. (PR #226867)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 27 18:51:49 PDT 2026


https://github.com/lhames created https://github.com/llvm/llvm-project/pull/226867

This substitution jit-loads object files via llvm-jitlink. Future tests, e.g. for lazy compilation, may want to JIT from other representations and will need different substitutions. Rename now to make the intent clear and save us renaming later.

>From 87357c3ae9248f0ae7c25c7f17a2ff2726c0ec24 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Mon, 28 Sep 2026 11:38:39 +1000
Subject: [PATCH] [orc-rt] Rename lit %{jit} substitution to %{obj-jit}.

This substitution jit-loads object files via llvm-jitlink. Future tests,
e.g. for lazy compilation, may want to JIT from other representations
and will need different substitutions. Rename now to make the intent
clear and save us renaming later.
---
 orc-rt/test/regression/README.md                       | 10 +++++-----
 .../test/regression/jit-free-foundations/lit.local.cfg |  2 +-
 orc-rt/test/regression/languages/c/lit.local.cfg       |  2 +-
 orc-rt/test/regression/languages/c/return-zero.c       |  2 +-
 orc-rt/test/regression/lit.cfg.py                      |  6 +++---
 orc-rt/test/regression/object-formats/lit.local.cfg    |  2 +-
 .../object-formats/mach-o/arm64/return-zero.s          |  2 +-
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/orc-rt/test/regression/README.md b/orc-rt/test/regression/README.md
index e29cbf280b36c2..71ede5606692f6 100644
--- a/orc-rt/test/regression/README.md
+++ b/orc-rt/test/regression/README.md
@@ -17,7 +17,7 @@ Place a test by the *question it asks*, not by the kind of input file it uses:
   directive) is handled correctly. These are written in assembly.
 
 The `jit-free-foundations/` rule is enforced: the `%{cc}`, `%{cxx}`, `%{mc}`,
-and `%{jit}` substitutions are unavailable there.
+and `%{obj-jit}` substitutions are unavailable there.
 
 ## Writing tests that run JIT'd code
 
@@ -27,7 +27,7 @@ A typical test:
 // Check that a trivial C program can be compiled and run under ogre.
 //
 // RUN: %{cc} -c -o %t.o %s
-// RUN: %{jit} -show-jit-result %t.o | FileCheck %s
+// RUN: %{obj-jit} -show-jit-result %t.o | FileCheck %s
 
 // CHECK: JIT result: 0
 
@@ -54,8 +54,8 @@ Conventions:
   target, using `llvm-mc`. Unlike `%{cc}` and `%{cxx}`, this can't be
   overridden, so object format tests always check the runtime against the
   same assembler.
-* **`%{jit}`**: Links and runs its inputs under ogre, using `llvm-jitlink` as
-  the controller. Pass `-show-jit-result` to print `JIT result: <value>`.
+* **`%{obj-jit}`**: Links and runs its inputs under ogre, using `llvm-jitlink`
+  as the controller. Pass `-show-jit-result` to print `JIT result: <value>`.
 * **`%{ogre}`**: Path to the ogre executable.
 
 Don't spell out a target triple or connection method in a test unless that's
@@ -78,7 +78,7 @@ the host:
 * **`orc-rt-cc`**: `%{cc}` is usable.
 * **`orc-rt-cxx`**: `%{cxx}` is usable.
 * **`llvm-mc`**: `%{mc}` is usable.
-* **`llvm-jitlink`**: `%{jit}` is usable.
+* **`llvm-jitlink`**: `%{obj-jit}` is usable.
 * **`target-arch=<arch>`**: The runtime's target architecture (`arm64` and
   `aarch64` are aliases).
 * **`target-object-format=<coff|elf|mach-o>`**: The runtime's target object
diff --git a/orc-rt/test/regression/jit-free-foundations/lit.local.cfg b/orc-rt/test/regression/jit-free-foundations/lit.local.cfg
index e7d7506a9f4fc4..97be930aa743af 100644
--- a/orc-rt/test/regression/jit-free-foundations/lit.local.cfg
+++ b/orc-rt/test/regression/jit-free-foundations/lit.local.cfg
@@ -9,5 +9,5 @@
 config.substitutions = [
     (pattern, replacement)
     for (pattern, replacement) in config.substitutions
-    if pattern not in ("%{cc}", "%{cxx}", "%{mc}", "%{jit}")
+    if pattern not in ("%{cc}", "%{cxx}", "%{mc}", "%{obj-jit}")
 ]
diff --git a/orc-rt/test/regression/languages/c/lit.local.cfg b/orc-rt/test/regression/languages/c/lit.local.cfg
index f3ecd77ac1b3cd..fb7ddd3f1a0f10 100644
--- a/orc-rt/test/regression/languages/c/lit.local.cfg
+++ b/orc-rt/test/regression/languages/c/lit.local.cfg
@@ -1,5 +1,5 @@
 # Tests that C source constructs behave correctly when JIT'd under the ORC
-# runtime. Tests compile with %{cc} and run the result with %{jit}.
+# runtime. Tests compile with %{cc} and run the result with %{obj-jit}.
 
 config.suffixes = [".c"]
 
diff --git a/orc-rt/test/regression/languages/c/return-zero.c b/orc-rt/test/regression/languages/c/return-zero.c
index 0cdd655414dc96..12fa4342a2891d 100644
--- a/orc-rt/test/regression/languages/c/return-zero.c
+++ b/orc-rt/test/regression/languages/c/return-zero.c
@@ -1,7 +1,7 @@
 // Check that a trivial C program can be compiled and run under ogre.
 //
 // RUN: %{cc} -c -o %t.o %s
-// RUN: %{jit} -show-jit-result %t.o | FileCheck %s
+// RUN: %{obj-jit} -show-jit-result %t.o | FileCheck %s
 
 // CHECK: JIT result: 0
 
diff --git a/orc-rt/test/regression/lit.cfg.py b/orc-rt/test/regression/lit.cfg.py
index de48c3d0091f6b..413a4e8bd505a4 100644
--- a/orc-rt/test/regression/lit.cfg.py
+++ b/orc-rt/test/regression/lit.cfg.py
@@ -30,15 +30,15 @@
 
 llvm_config.use_default_substitutions()
 
-# %{jit} runs JIT'd code under ogre, with llvm-jitlink as the controller. Tests
-# that use it must be gated on the llvm-jitlink feature.
+# %{obj-jit} runs JIT-loaded object files under ogre, with llvm-jitlink as the
+# controller. Tests that use it must be gated on the llvm-jitlink feature.
 ogre = os.path.join(config.orc_rt_obj_root, "tools", "ogre", "ogre")
 config.substitutions.append(("%{ogre}", ogre))
 llvm_jitlink = llvm_config.use_llvm_tool("llvm-jitlink")
 if llvm_jitlink:
     config.available_features.add("llvm-jitlink")
     config.substitutions.append(
-        ("%{jit}", "{} -oop-launch={}".format(llvm_jitlink, ogre))
+        ("%{obj-jit}", "{} -oop-launch={}".format(llvm_jitlink, ogre))
     )
 
 
diff --git a/orc-rt/test/regression/object-formats/lit.local.cfg b/orc-rt/test/regression/object-formats/lit.local.cfg
index 508174ed69e217..b65beeb39db45e 100644
--- a/orc-rt/test/regression/object-formats/lit.local.cfg
+++ b/orc-rt/test/regression/object-formats/lit.local.cfg
@@ -1,6 +1,6 @@
 # Tests that object format features (e.g. relocations, sections, and
 # directives) are handled correctly by the ORC runtime. Tests are assembled
-# with %{mc}, and the result run with %{jit}.
+# with %{mc}, and the result run with %{obj-jit}.
 #
 # Tests live in <format>/<arch>/ subdirectories, which gate on the runtime's
 # target.
diff --git a/orc-rt/test/regression/object-formats/mach-o/arm64/return-zero.s b/orc-rt/test/regression/object-formats/mach-o/arm64/return-zero.s
index 7373bdcc3be0da..3c5e0c007a5fdf 100644
--- a/orc-rt/test/regression/object-formats/mach-o/arm64/return-zero.s
+++ b/orc-rt/test/regression/object-formats/mach-o/arm64/return-zero.s
@@ -1,7 +1,7 @@
 // Check that a trivial MachO arm64 object can be linked and run under ogre.
 //
 // RUN: %{mc} -o %t.o %s
-// RUN: %{jit} -show-jit-result %t.o | FileCheck %s
+// RUN: %{obj-jit} -show-jit-result %t.o | FileCheck %s
 
 // CHECK: JIT result: 0
 



More information about the llvm-commits mailing list