Commit 4a2c1a8
committed
fix(toolchain): resolve .exe tool names on Windows; collapse the host/target gate
Two changes to one code region, which is why they share a commit — splitting
them would leave a middle state that does not compile.
B1 — the frontend was unfindable on a Windows host.
musl payload candidates were { "<triple>-g++", "g++" }, resolved with
filesystem::exists. On Windows the file is `<triple>-g++.exe`, so exists()
said no and a payload that installed perfectly was then unusable. The mingw
branch has carried the .exe spelling since it shipped; this branch never did,
because nothing had ever installed a musl payload on a Windows host. Same
omission in archive_tool's musl branch (`<triple>-ar`), fixed alongside.
.exe is listed first: on a case-insensitive filesystem both spellings match
and the executable is the one we want.
host_can_serve — one derivation instead of two.
"Can this host serve that target" was computed independently in two places:
registry.cppm picking the xim payload, and lifecycle.cppm deciding whether
`toolchain list` may show a target as available. They had already drifted —
the payload side would resolve a windows-hosted musl package that the
availability side declared impossible. The predicate now lives once, in
registry.cppm next to the payload resolution it has to agree with, and
lifecycle calls it.
It also gains the case this series exists for: a non-Linux host may serve a
Linux target when the payload is self-contained (musl) and built for that
host's own arch. Deliberately narrow — the canadian-cross payload is built
per host arch, and macOS has no Linux-targeting payload at all, so both stay
unserviceable rather than failing at install time.
available_toolchain_indexes now lists the windows-hosted cross under the same
name to_xim_package() derives (`<triple>-gcc`), so the Available listing and
the install path cannot disagree.
Refs .agents/docs/2026-08-03-windows-host-linux-cross-design.md §1.2, §1.3 (B1)1 parent 568bbc8 commit 4a2c1a8
2 files changed
Lines changed: 73 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
371 | 375 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
| 376 | + | |
380 | 377 | | |
381 | 378 | | |
382 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
116 | 128 | | |
117 | 129 | | |
118 | 130 | | |
| |||
225 | 237 | | |
226 | 238 | | |
227 | 239 | | |
228 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
229 | 253 | | |
230 | 254 | | |
231 | 255 | | |
| |||
299 | 323 | | |
300 | 324 | | |
301 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
302 | 352 | | |
303 | 353 | | |
304 | 354 | | |
| |||
307 | 357 | | |
308 | 358 | | |
309 | 359 | | |
310 | | - | |
| 360 | + | |
311 | 361 | | |
312 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
313 | 368 | | |
| 369 | + | |
314 | 370 | | |
315 | 371 | | |
316 | 372 | | |
| |||
354 | 410 | | |
355 | 411 | | |
356 | 412 | | |
357 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
358 | 422 | | |
359 | 423 | | |
360 | 424 | | |
| |||
0 commit comments