Skip to content

Commit e976f94

Browse files
fix: a paired provider this host lacks is host-cannot-serve; the matrix states the target model's cells
The target matrix scanned this release for the first time on the four hosts. Its changed cells are the target model's: musl identities served by openkal-platform where no other provider is (llvm builds them, gcc and msvc are capability-pin, the graph mode's pinned family is outside the platform's version group), windows-gnu with llvm paired with the MinGW-w64 payload, and the i686-none-elf row. One cell was a defect: windows-gnu with llvm on a host without the MinGW payload failed its install as an unnamed refusal; it is now host-cannot-serve. e2e 1044 runs in the job that has wine. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 55d5ad5 commit e976f94

4 files changed

Lines changed: 109 additions & 52 deletions

File tree

‎.github/workflows/cross-build-test.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,14 @@ jobs:
359359
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
360360
bash tests/e2e/102_mingw_cross_wine.sh
361361
362+
# SPEC-016 §6: clang with the MinGW-w64 payload as its sysroot, run
363+
# under wine. Named here for the reason 102 is: `# requires: mingw-cross
364+
# wine`, which no Linux shard has.
365+
- name: "e2e: clang pairs with the MinGW payload"
366+
run: |
367+
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
368+
bash tests/e2e/1044_clang_pairs_with_the_mingw_payload.sh
369+
362370
# mcpp#365. This is the only job with a MinGW cross toolchain, so it is
363371
# the only place the GNU half of resource compilation (windres -O coff,
364372
# because GNU ld cannot consume a .res) can run at all — the Linux e2e

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@
119119
program's objects came first: a global constructor that allocated (an mtest
120120
case's registration) stopped in openkal-musl's allocator before the library
121121
was up, on hosted macOS (e2e 1053).
122+
- `x86_64-windows-gnu` with llvm on a host the MinGW-w64 payload does not
123+
serve (linux-aarch64, macOS) is refused as `host-cannot-serve`, as with gcc;
124+
the paired payload's failed install was an unnamed refusal.
125+
- The target matrix's expected table states the cells the target model
126+
changes, measured on the four hosts; e2e 1044 runs in the job that has wine.
122127
- e2e 298 picks a row whose compiler on this host is its convention's: a macOS
123128
host serves `aarch64-linux-musl` through openkal-platform, whose compiler is
124129
llvm, and there llvm alone overrides nothing.

‎src/build/prepare/toolchain_decision.cpp‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,27 @@ std::expected<void, std::string> phase5_toolchain_after_graph(PrepareState& stat
438438
&& std::ranges::find(p->pairs, mcpp::toolchain::family_name(declared->family))
439439
!= p->pairs.end();
440440
});
441+
// A PAIRED PROVIDER THIS HOST DOES NOT HAVE SUPPLIES NOTHING. The
442+
// selection took it as the first candidate of all, none being
443+
// available (§4.6); with the toolchain stated, the diagnosis of an
444+
// unserved target was not composed, and the payload's install
445+
// failed as an unnamed refusal (target matrix, linux-aarch64).
446+
auto const& choice = state.targetChoice;
447+
const bool pairedHere = std::ranges::any_of(choice.candidates, [&](auto const& k) {
448+
return k.available && k.provider && k.provider->name == choice.provider
449+
&& k.row && k.row->triple == choice.identity;
450+
});
451+
if (paired && !pairedHere) {
452+
refusal::record(refusal::Code::HostCannotServe);
453+
return std::unexpected(std::format(
454+
"target '{}' with {} takes its system from the '{}' provider's {} payload, "
455+
"which this host does not have.\n"
456+
" `mcpp why target --target {}` lists the providers of the target and "
457+
"where each is available; depend on a package that implements the "
458+
"target's system to build it here.",
459+
state.targetRowName, *state.tcSpec, choice.provider, state.targetRowPin,
460+
state.targetRowName));
461+
}
441462
if (paired) state.pairedSystem = state.targetRowPin;
442463
else if (declared && rowTc && declared->family != rowTc->family) {
443464
refusal::record(refusal::Code::ConventionUnreplaced);

0 commit comments

Comments
 (0)