Skip to content

The FreeBSD rows build on a Windows host: sysroot revision 2, mcpp 2026.11.18.1 - #4

Merged
Sunrisepeak merged 2 commits into
mainfrom
ci/freebsd-windows
Nov 18, 2026
Merged

Sunrisepeak merged 2 commits into
mainfrom
ci/freebsd-windows

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

The one case #3 left: on a Windows host the FreeBSD rows compiled and did not link, because FreeBSD's crt objects and static archives hold zlib-compressed debug sections and the lld of the Windows LLVM payload is built without zlib.

The FreeBSD sysroot packages are corrected (openxlings/xim-pkgindex#1184, 14.5 revision 2: the sections decompressed, their contents unchanged). The two cells return to the Windows build matrix, and docs/adding-a-system.md states the three defects and where each was corrected.

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.
@Sunrisepeak Sunrisepeak changed the title The FreeBSD rows build on a Windows host: the sysroot's revision 2 The FreeBSD rows build on a Windows host: sysroot revision 2, mcpp 2026.11.18.1 Nov 18, 2026
@Sunrisepeak
Sunrisepeak merged commit 156fa61 into main Nov 18, 2026
28 checks passed
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