Commit 4c36376
committed
ci(llvm): drop llvm-config from distribution; build + copy it by hand
CI confirmed what issue #364's analysis predicted: when LLVM_BUILD_TOOLS=Off,
cmake's `llvm_add_tool` never creates the `install-llvm-config` target
(both the `install(TARGETS)` call and `add_llvm_install_targets` are gated
on LLVM_BUILD_TOOLS in AddLLVM.cmake). LLVM_DISTRIBUTION_COMPONENTS errors
out at configure time with "Specified distribution component 'llvm-config'
doesn't have an install target".
Fix: drop `llvm-config` from the distribution whitelist, and after
`ninja install-distribution` completes, directly `ninja llvm-config`
(force-build the excluded-from-ALL target) and `fs_extra::file::copy` the
binary into the install prefix's `bin/` dir. Rust-side, co-located with
the rest of the Windows logic.
Still cleaner than the pre-rework YAML version:
- No YAML file round-trip for `--extra-args`
- No dead `LLVM_TOOL_LLVM_CONFIG_BUILD='On'` flag
- All Windows-specific logic in one Rust file, not split
- Uses install-distribution for everything that is distribution-aware
(libs, headers, cmake-exports); only llvm-config takes the manual path1 parent c8edbb5 commit 4c36376
2 files changed
Lines changed: 30 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
| 175 | + | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
183 | 188 | | |
184 | 189 | | |
185 | 190 | | |
186 | 191 | | |
187 | 192 | | |
188 | 193 | | |
189 | | - | |
190 | 194 | | |
191 | 195 | | |
192 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
81 | 100 | | |
82 | 101 | | |
83 | 102 | | |
| |||
0 commit comments