Commit efcb560
committed
ci(llvm): disable Windows LLVM tools except llvm-config
Retry of the Windows LLVM tool-disable that landed+reverted in #360
(commits 3106d1e / 90df14b). The first attempt broke `Run tests` because
`llvm-sys` (pulled in via inkwell) runs `${LLVM_SYS_211_PREFIX}/bin/llvm-config`
at Rust crate-build time to discover include/lib paths, and `llvm-config` is
itself an LLVM tool that got disabled along with the rest.
This version keeps `llvm-config` alive while disabling the other ~200 tool
binaries:
-DLLVM_BUILD_TOOLS=Off # tools are no longer in the ALL target
-DLLVM_INCLUDE_TOOLS=On # tools/ subdirectory still configured,
# so individual tool targets exist
-DLLVM_TOOL_LLVM_CONFIG_BUILD=On # per-tool override forces llvm-config
# specifically into the ALL target
LLVM's cmake uses the `LLVM_TOOL_<name>_BUILD` pattern to let individual
tools opt back in when LLVM_BUILD_TOOLS is off. Expected effect: only
`llvm-config.exe` builds (small link), the ~200 heavy tool links are skipped.
Run 24771100328 confirmed the validation target: with all tools disabled
the Windows Build LLVM step went from 42 min → 9:44 (4.3×). This PR aims
to preserve that win while keeping `llvm-sys` happy.
Cache-key hardening (required for correctness)
Extracts the cmake `--extra-args` construction into a new `Compute LLVM
build config` step and hashes the flag list into the artifact cache key
(`...-args<sha8>-<solx-llvm-sha>`). Without this, the existing key only
reflects the solx-dev action inputs + the solx-llvm submodule SHA — not
the cmake flags — so entries built with `LLVM_BUILD_TOOLS=Off` on Windows
would share a key with entries built with tools `On` and silently serve
the wrong install tree.
Side-benefit: the hash catches any future output-affecting flag added to
`--extra-args` without requiring reviewer discipline to update the key.
Non-output-affecting flag tweaks (e.g. LLVM_PARALLEL_LINK_JOBS scheduling)
also rotate the key, costing one cold build per tweak — acceptable with
ccache as fallback and much more robust than manual key maintenance.
The Build LLVM step now reads `${RUNNER_TEMP}/llvm-extra-args` produced by
the new step, so EXTRA_ARGS is constructed once and consumed twice (once
for the hash, once for the build).
Acceptance:
- Windows Build LLVM step < 15 min on a warm-ccache run.
- Windows `Run tests` succeeds (llvm-sys finds llvm-config).
- No regression on Linux/macOS (no flag change; just the new args-hash
key component, which triggers a one-time cold build on first run).
- `Show ccache stats` still reports near-100% hit rate.
See #364 for the full design rationale and alternatives considered.1 parent bf8cf2c commit efcb560
1 file changed
Lines changed: 48 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
55 | 98 | | |
56 | 99 | | |
57 | 100 | | |
| |||
64 | 107 | | |
65 | 108 | | |
66 | 109 | | |
67 | | - | |
| 110 | + | |
68 | 111 | | |
69 | 112 | | |
70 | 113 | | |
| |||
162 | 205 | | |
163 | 206 | | |
164 | 207 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
175 | 211 | | |
176 | 212 | | |
177 | 213 | | |
178 | | - | |
| 214 | + | |
179 | 215 | | |
180 | 216 | | |
181 | 217 | | |
| |||
0 commit comments