Repository navigation
mcpp.platforms 0.1.0 lists every host - #818
Merged
Merged
Conversation
Sunrisepeak
added a commit
to mcpp-community/mcpp
that referenced
this pull request
Nov 18, 2026
…format); openkal-platform 0.29.2 is the default (#951) ## The defect The engine answered a row's object format and artifact names by a branch per system (`windows`, `macos`, `linux`, `openkal`, `emscripten`), and a built-in row without a branch took the host's naming. A platform's rows were read from data. On a Windows host a FreeBSD row's program was therefore `bin/<name>.exe` and its archives `.lib`, while the NetBSD and OpenBSD rows a platform package defines built there at once. Measured in mcpp-community/mcpp-platforms#4: with the FreeBSD sysroot's revision 2 the build of `x86_64-freebsd` finished on `windows-2025` and no `bin/hello` existed. 21 rows of the snapshot answered with the host's naming (FreeBSD, bare metal, iOS). It was not seen in #949 because e2e 1116, the case about this, carried the capability `llvm`, which is a Linux one: the case never ran on the two hosts it is about. ## The change One reading for every row, built-in or a platform's (SPEC-016 v1.5; design record §12): - `object-format`, `exe-suffix` and `shared-suffix` are read in three steps, the first statement taken: the row, its system (`[[platform.system]]`), the convention of the object format (elf, mach-o, pe, coff, wasm). The engine names no system for it, and the host's naming answers only for a triple that is neither a row nor of a system the table states. - `[[platform.system]]` accepts the three keys, in the built-in table and in a platform package alike. A `[[platform.define]]` row may leave `object-format` unstated: it is its system's, then ELF. - The built-in table states what the branches expressed: `pe` on the system `windows`, `mach-o` on `macos` and on the iOS rows, `.oke`/`.okso` on the ok image rows, `.js` on `wasm32-emscripten`. The rows snapshot is identical before and after that move, and the system-name baseline falls (linux 63→62, macos 51→49, windows 72→70, emscripten 18→17, ios 24→23). - `mcpplibs.openkal-platform@0.29.2` is the default platform of the rows openkal serves: it states the hosts of each runner, so `x86_64-windows-musl` on a Windows host runs with no runner without the project stating the release. ## Tests - `tests/unit/test_artifact_naming.cpp`: a FreeBSD row and a row of each format from a bogus host; row before system before format, over a platform's definitions; a triple of a stated system that is no row. - `tests/unit/test_platform.cpp`: the manifest reads the three system keys and a row without `object-format`. - e2e 1116 runs wherever the LLVM payload is (`scan-deps`), and holds the program to the row's exact name; it needs mcpplibs/mcpp-index#818 (the platform package's entry listed Linux hosts only). - e2e 1118: a platform's system states `exe-suffix`; a row that states none takes it, a row that states its own keeps it. ## With it The FreeBSD rows link on a Windows host with the sysroot packages' revision 2 (openxlings/xim-pkgindex#1184: zlib-compressed debug sections of the crt objects and static archives, which the lld of the Windows LLVM payload does not read, are held decompressed). No change of mcpp was needed for that. ## Compatibility Published platform packages were read row by row: their PE and COFF rows state `exe-suffix`, their ELF rows state none, and the three steps give them the names they had. Two readings differ for rows no published package has: a platform's PE row without `exe-suffix` is `.exe` (was no suffix), and a platform's row without `object-format` takes its system's before ELF. Version 2026.11.18.1; CHANGELOG, SPEC-016, docs/35 and the design record state the change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The entry listed Linux alone. A macOS or Windows host could not install the package (
E_NOT_FOUND: package 'mcpp:platforms@0.1.0' has no build for windows (available on: linux)), so the rows it serves (FreeBSD, NetBSD, OpenBSD) could not be built there from the index. Measured in mcpp's e2e 1116 onwindows-2025once the case ran there (mcpp-community/mcpp#951); mcpp-platforms' own CI builds the package from its checkout and did not see it.The package is a statement, not a program: the same archive for every host.