Commit 22aed11
committed
[ci] Consolidate the OOP-JIT and in-process LLVM caches.
Two OOP-JIT cells (`ubu24-x86-gcc12-llvm22-oop-vg`,
`osx26-arm-clang-llvm22-oop`) used a dedicated `-oop`-suffixed
cache slot. `Build_LLVM` baked `llvm-jitlink-executor` and
`orc_rt-<arch>` into that slot under a `matrix.oop-jit == 'On'`
gate, and the matrix rows additionally enabled
`llvm_enable_projects: clang;compiler-rt` so the orc_rt target
existed in the LLVM build. The whole arrangement existed because
OOP-JIT used to require `clang20-1-out-of-process.patch` (a
966-line backport of `clang::Interpreter::JITConfig`), which
genuinely changed the cached binary.
That patch retired in fb595ac (#924) when OOP-JIT moved to
upstream `release/22.x`'s `clang::IncrementalExecutorBuilder`.
The OOP and in-process LLVM builds are now identical modulo the
two runtime-only artifacts (`llvm-jitlink-executor` and
`orc_rt`). Drop the dedicated cache slot and source the runtime
parts from packages instead, so OOP rows free-ride the same
cache as their in-process counterparts.
Cache-side:
- `main.yml`: drop the `${{ matrix.oop-jit == 'On' && '-oop' ||
'' }}` segment from the cache key. Every non-OOP key is
bit-identical to before, so existing cache entries continue
to hit -- no invalidation. The previously `-oop`-suffixed
entries become orphaned (still in storage until eviction,
just unreferenced).
- `main.yml` matrix: drop `llvm_enable_projects:
clang;compiler-rt` from both OOP rows so they share build
config, and therefore cache content, with their non-OOP
twins on the same axes.
- `Build_LLVM/action.yml`: drop the `if oop-jit == On: ninja
llvm-jitlink-executor orc_rt-<suffix>` block. The cache now
contains a vanilla LLVM build regardless of `matrix.oop-jit`.
Runtime-side, OOP coverage preserved:
- `main.yml` adds an `Install OOP-JIT runtime` step gated on
`matrix.oop-jit == 'On'`. It installs the runtime parts via
apt.llvm.org (`llvm-${runtime}` for the executor binary,
`libclang-rt-${runtime}-dev` for the orc_rt static archive)
on Linux, or `brew install llvm@${runtime}` on macOS. The
install step then symlinks both into the test binary's
expected resource-dir layout
(`<test-bin-dir>/lib/clang/<major>/{bin,lib/<triple>}/`).
That path matters: at test time `clang::IncrementalExecutor
Builder` derives the resource directory from
`getMainExecutable()` (the test binary), and the upstream
safety check refuses to use an `orc_rt` whose path isn't
under that directory. Symlinking before `Build_and_Test_
CppInterOp` runs is fine -- CppInterOp's build doesn't
overwrite those paths.
- `Build_and_Test_CppInterOp/action.yml` keeps both the
`-DLLVM_BUILT_WITH_OOP_JIT=${{ matrix.oop-jit }}` cmake flag
and the OOP-specific Valgrind suppression branch. The OOP
test fixtures from PR #717 still parameterize over both
in-process and OOP modes on those rows.
The cached LLVM stays `LLVM_ENABLE_ASSERTIONS=ON`, so the JIT
compiler that runs in-process during CppInterOp's tests still
fires its internal assertions -- which is the assertion signal
worth keeping. `orc_rt` and `llvm-jitlink-executor` are runtime
support code, not assertion-rich, so sourcing them from packages
doesn't lose coverage.
Two follow-ups out of scope for this commit:
- Retire the `LLVM_BUILT_WITH_OOP_JIT` macro from CppInterOp
source. The compile-time gate becomes an LLVM-version /
platform check, and a runtime check decides whether to
actually use OOP. After that, `Build_and_Test_CppInterOp`
no longer needs the cmake flag and the matrix's `oop-jit`
field becomes purely a Valgrind-mode hint.
- Bundle `orc_rt` (and ship `llvm-jitlink-executor`) inside
`libclangCppInterOp.so`'s distribution so the library is
self-contained. Removes the install step entirely.1 parent fb595ac commit 22aed11
3 files changed
Lines changed: 71 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 58 | | |
67 | 59 | | |
68 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
| |||
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
109 | | - | |
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
| |||
136 | 134 | | |
137 | 135 | | |
138 | 136 | | |
139 | | - | |
| 137 | + | |
140 | 138 | | |
141 | 139 | | |
142 | 140 | | |
| |||
171 | 169 | | |
172 | 170 | | |
173 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
174 | 233 | | |
175 | 234 | | |
176 | 235 | | |
| |||
0 commit comments