Skip to content

ninja 1.12.1-mcpp.1, mcpp.buildopt (BMI and object cutoff on every host, the private module fragment as a unit, the register), BSD rows off Linux hosts, workspace publishing - #949

Merged
Sunrisepeak merged 30 commits into
mainfrom
eco/ninja-cascade-publish
Nov 17, 2026

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

One round after 2026.11.17.1: mcpp#945, #946, #947, the items left by the second part of the ecosystem plan, and the build optimizations as one package. Design record: .agents/docs/2026-11-17-ninja-cascade-publish-supplement-design.md (v5). Version 2026.11.17.2.

ninja (mcpp#945)

  • ninja 1.12.1-mcpp.1 (mcpp-community/ninja: 1.12.1 with the first commit of Invalidate Iterator in Plan::EdgeFinished ninja-build/ninja#2840, the correction of segfault in Plan::NodeFinished ninja-build/ninja#2662), installed through xlings beside the version a home has; an upgraded home is told which version replaces which, and keeps its ninja where the install fails.
  • A build that ninja ended without naming a failed step states how ninja ended and whether it ran the pinned one.
  • Members of a workspace share a build directory, and a package's units had another command line under each member: dependencies' include directories in the order the root's graph was walked, features' defines in the order they were activated. On a workspace of 31 members, 753 of 3544 edges differed between two members by order alone, and a run with no source changed compiled them. Usage is carried dependencies first, defines are ordered by name; the same two members then differ in no edge (e2e 1115).

mcpp.buildopt (mcpp#946; SPEC-018, SPEC-019)

Everything mcpp does to a build beyond the compiler's and ninja's behaviour is one package, modules/buildopt, and an entry of one register with its level, default and parameter. The pipeline asks at three seams (source, graph, edge). MCPP_BUILDOPT=off is the standard build.

Entry Default Parameter
keep-bmi, keep-object, gcm-stamps, scan-pass on —
gcm-locations on [profile.<name>] bmi_cutoff, MCPP_BMI_CUTOFF
split-schedule off [build] bmi_schedule, MCPP_BMI_SCHEDULE
private-fragment on [build] private_fragment, MCPP_PRIVATE_FRAGMENT
  • O1: GCC's stamp is masked to its terminator, so the cutoff holds outside UTC. O2: a GCC BMI whose line maps alone moved is kept. O6: a build states which BMIs it replaced and kept.
  • O7: the previous BMI is held, compared and put back by the executor of the compile edge, not by a shell fragment: every host has the cutoff (e2e 1111). O5: an object compiled to the bytes it had is kept, and nothing is archived or linked for it (0.29 ms a comparison against 0.8–1.45 s a link).
  • A private module fragment is built as a unit of its own: an edit of it compiles that unit and no importer, with clang (which otherwise compiles every importer) and with gcc (which does not build a fragment as written). A fragment that reads what is local to the interface is built as written (e2e 1112, 1113).
  • A build says once of a module that is one file with five or more importing units what ends its rebuilds (e2e 1114).
  • GCC's scan no longer empties the unit's object.

Targets

Publishing (mcpp#947)

  • mcpp publish --tag, --workspace, -p; archives and descriptors by identity; a sibling path edge takes the sibling's version; SHA256SUMS.

Documents

SPEC-018 (the rebuild of modules), SPEC-019 (build optimizations), chapters 13 (code and project style) and 26 (build optimizations) in both languages, modules/buildopt/README.md, chapters 04, 11 and 50, CHANGELOG.

…kspace publishing (#947), and part 2's remaining items (for review)
… request per repository with checkpoint commits
#945); a runner is taken on the hosts it states; a platform selected by a layer is warned of; the engine's default openkal-platform is 0.29.1; --strict names the key itself
…mat in a module of its own; a GCC BMI whose line maps alone moved is kept (bmi_cutoff, #946 O2) and a run states what changed (O6)
…ine maps; 1109: a runner is taken on the hosts it states
…y, --tag, the index's descriptor shape, --workspace and -p with SHA256SUMS (#947)
…ters 04, 11 and 50 in both languages, CHANGELOG
@Sunrisepeak
Sunrisepeak marked this pull request as ready for review November 17, 2026 04:55
@Sunrisepeak Sunrisepeak added the ci:canaries Run the canary matrix (canaries.yml) on this pull request label Nov 17, 2026
@Sunrisepeak Sunrisepeak changed the title ninja 1.12.1-mcpp.1, the BMI cutoff outside UTC and for line maps (mcpp.bmi), runner hosts, workspace publishing ninja 1.12.1-mcpp.1, mcpp.buildopt (BMI and object cutoff on every host, the private module fragment as a unit, the register), BSD rows off Linux hosts, workspace publishing Nov 17, 2026
@Sunrisepeak
Sunrisepeak merged commit a128358 into main Nov 17, 2026
165 of 167 checks passed
Sunrisepeak added a commit 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).
- `[email protected]` 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:canaries Run the canary matrix (canaries.yml) on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant