Skip to content

Verify a cross where the machine can run what it built - #165

Merged
frangarcj merged 1 commit into
masterfrom
next-macos-cross-verified
Aug 25, 2026
Merged

Verify a cross where the machine can run what it built#165
frangarcj merged 1 commit into
masterfrom
next-macos-cross-verified

Conversation

@frangarcj

Copy link
Copy Markdown
Contributor

x86_64-apple-darwin became a native build in #161 for a good reason: nothing ever executed what the cross produced, so it had no toolchain contract and no bootstrap smoke test, and a host nobody can check is a host that should not publish. Native fixed that and cost the time. In the first real nine-host publication it took 62m22s against 14m03s for its arm64 sibling on the same run, and every stage-3 host waits behind it.

The line that decided this reads:

# Only a native build can run its own output.
if [[ -z $build_host ]]; then

True of a canadian cross to Windows or FreeBSD. Not true of Apple: an arm64 Mac runs x86_64 Mach-O through Rosetta, so the machine that cross-builds the Intel SDK is the same one that can execute and check it.

So the question changes from is this native to how do I run this host's binaries here. host_runner answers with a launcher prefix — empty for a native host, arch -x86_64 for the Intel Mac SDK built on arm64 — or fails for a host nothing here can execute. Both the contract and the smoke test take that prefix, and check-toolchain-contract gets it through a new VITASDK_HOST_RUNNER cache variable so the invocation stays in one place rather than being duplicated into the shell script.

Windows and FreeBSD answer "cannot" and are skipped exactly as they were, and the skip now says so instead of being silent.

Measured before writing any of this, in frangarcj/vitasdk-ci-probe, on macos-14:

cross build 650s
compiler runs under Rosetta 0s
toolchain contract under Rosetta 24s
bootstrap smoke under Rosetta 30s
whole job 12m18s
native on macos-15-intel, for comparison 62m22s

The smoke test there was the real one — install from the bootstrap archive against its sha256, then vdpm --help, libexec/vdpm/pacman --version and arm-vita-eabi-gcc --version — and the contract included checking that public headers compile on their own, which is the check that caught two broken headers earlier today.

tests/ci/test-host-runner.sh covers the seven cases, including the two directions Rosetta does not go: a Linux box cannot run the Intel Mac SDK, and an Intel Mac cannot run an arm64 one. It also pins the set of packaged hosts this script cannot run — Windows and the two FreeBSD ones — so adding another passes somebody's eyes. Windows stays verified by its own job on a real Windows runner; the two FreeBSD hosts are verified nowhere, which that test records as a gap rather than fixes, since closing it needs a FreeBSD VM and not Rosetta.


AI tools were used in preparing this PR (Claude Opus 5, Anthropic).

x86_64-apple-darwin became native in #161 because nothing ever executed
what the cross produced: no toolchain contract, no bootstrap smoke test,
so it could not be published. That was the right call for the evidence
and it cost the time. In the first real nine-host publication it took 62
minutes against 14 for its arm64 sibling, and it is the pole every other
host waits behind.

"Only a native build can run its own output" is true of a canadian cross
to Windows or FreeBSD and false of Apple: an arm64 Mac runs x86_64
Mach-O through Rosetta, so the machine that cross-builds the Intel SDK
is the one that can check it. The gate now asks how to run this host's
binaries here rather than whether the build is native, and passes the
launcher to both the contract and the smoke test. Windows and FreeBSD
answer "cannot" and are skipped exactly as before.

Measured end to end in the probe repository before touching this: cross
650s, contract 24s, bootstrap smoke 30s, 12m18s for the whole job
against 62m22s native -- same checks, same published host.
@frangarcj
frangarcj merged commit db4d1a5 into master Aug 25, 2026
13 of 19 checks passed
@frangarcj
frangarcj deleted the next-macos-cross-verified branch August 26, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant