Skip to content

Commit 6eb85d6

Browse files
runs_on in mcpp-package.json and the index entry; the Windows launcher is a program
- A package states where it runs, once, when it is packed: runs_on.self (with what it carries) and runs_on.with.<runner> (given the machine's runner, from the platform's runner.hosts). --merge unites it; an older package's is derived from its systems and images. - mcpp emit xpkg writes each system's block from runs_on: a self-contained universal package names the pairs whose runner it carries, so an Intel Mac is no longer offered a package with no runner for it (#860). - bin/<name>.exe replaces bin/<name>.cmd: the engine's launcher program, built for x86_64 Windows over the platform's hosted arrangement, finds the package from its own path and becomes the runner; the POSIX script hands a Windows shell (Git Bash, MSYS, Cygwin) to it. xvm registers <name>.exe. - dep_dir's refusal of an ambiguous name is printed on standard output: a FILE binding in the build-program module collided with a program's <cstdio>. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 734d9c6 commit 6eb85d6

9 files changed

Lines changed: 402 additions & 109 deletions

‎CHANGELOG.md‎

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,69 @@
44
> Each `## [<version>]` section is that release's notes. Entries are written in English
55
> from 2026.9.28.3 on; earlier entries remain as written.
66

7+
## [2026.10.30.1] - 2026-10-30
8+
9+
### Added
10+
11+
- **The build's contract, `${mcpp.contract}`.** Every configuration writes
12+
`mcpp-contract.json` beside its compile database: the compiler of each
13+
language with the words every unit is compiled with (target, sysroot,
14+
target-side headers, platform and profile flags), and the link driver, its
15+
words and the archiver. A build program's action names it with
16+
`${mcpp.contract}` and reads it while ninja runs, so a foreign build system
17+
compiles for the target as the engine does; the engine's own C++ dialect and
18+
module words are not in it (e2e 982). mcpp-plugins 0.21.0's `deps-cmake`
19+
compiles a cross build's subproject from it.
20+
- **`[platform] runner.hosts`, carrier entries and `descriptor_keys`.** A
21+
platform states the `<os>-<arch>` pairs its runner exists for, any number of
22+
carrier entries each for the pairs in its `hosts` (an entry of a carrier
23+
model this mcpp does not build is skipped with a warning), and the
24+
descriptor blocks its targets read (SPEC-013 §1.1, §10, §11, §14).
25+
- **`runs_on` in `mcpp-package.json`.** Where a package runs is computed once
26+
when it is packed: `self`, the pairs it runs on with what it carries, and
27+
`with.<runner>`, the pairs it runs on given the machine's runner.
28+
29+
### Changed
30+
31+
- **A target reads the descriptor blocks its row names, never the build
32+
machine's (#851).** A target that is not Linux, macOS or Windows read the
33+
block of the system mcpp ran on, so a Web build took a dependency's `linux`
34+
block on Linux and its `windows` block on Windows, and an ok image the block
35+
of whichever system built it. Each row now names its blocks in order:
36+
`wasm32-emscripten` reads `emscripten`, then `linux`; `<arch>-openkal`
37+
`openkal`, then `linux` (a platform may state its own); iOS `ios`, then
38+
`macosx`; bare metal `none`. Version resolution, the synthesised manifest
39+
and the index refresh read the same block (unit `DescriptorKeys`).
40+
- **The Web link carries the profile's optimisation level (#851).** emcc runs
41+
wasm-opt and minifies the JavaScript launcher at the link, which had no
42+
`-O`: a release Web program was linked at `-O0`. The hello world's
43+
JavaScript is 13 KB rather than 66 KB (e2e 981).
44+
- **`[target.<sel>.abi] exceptions` takes the model (#851).** `"wasm"` selects
45+
WebAssembly's exception handling (`-fwasm-exceptions`), `"js"` the
46+
JavaScript model; `true` keeps the JavaScript model it has selected since
47+
2026.9.12.3. The model is part of every cache key (e2e 981).
48+
- **`mcpp emit xpkg` names where a package runs (#860).** A
49+
self-contained universal package's entry named every system with every
50+
image architecture, so an Intel Mac installed a package that carries no
51+
runner for it. Each system's block names the architectures `runs_on` gives:
52+
the carried runners for a self-contained package, the pairs the platform's
53+
runner exists for otherwise.
54+
55+
### Fixed
56+
57+
- **A name two dependencies answer to is no package's (#852).** Two
58+
dependencies whose manifests both say `rules` warned on every build, and the
59+
bare name went to one of them. It is now published for neither:
60+
`MCPP_DEP_AMBIGUOUS_RULES` lists the qualified names, each qualified name
61+
keeps its own directory, and `dep_dir("rules")` ends the build program naming
62+
both (e2e 980).
63+
- **Programs start in the Android app sandbox again (#857).** Under `run-as`
64+
(SELinux `runas_app`) every program mcpp started failed with "not found"
65+
since 2026.10.26.2. A static strace showed one failing call, before any
66+
process was created: the root directory opened for reading, which the
67+
domain may search but not read. openkal-linux 0.18.3 opens every directory
68+
handle with `O_PATH`.
69+
770
## [2026.10.29.1] - 2026-10-29
871

972
### Fixed

‎src/build/hostprogram.cppm‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -805,10 +805,12 @@ inline const char* dep_dir(const char* name) {
805805
unsigned long a = 19;
806806
for (unsigned long i = 9; i < o && a + 1 < sizeof ambiguous; ++i, ++a) ambiguous[a] = buf[i];
807807
ambiguous[a] = 0;
808+
// Said on standard output, which the engine prints when the program exits
809+
// non-zero; `std::fprintf(stderr, ...)` here would bind `FILE` in this
810+
// module and collide with a build program's own <cstdio>.
808811
if (const char* which = std::getenv(ambiguous)) {
809-
std::fprintf(stderr,
810-
"build.mcpp: dep_dir(\"%s\") names more than one dependency (%s); ask by one of "
811-
"those names\n", name, which);
812+
std::printf("build.mcpp: dep_dir(\"%s\") names more than one dependency (%s); ask by one of "
813+
"those names\n", name, which);
812814
std::exit(2);
813815
}
814816
buf[o++] = '_'; buf[o++] = 'D'; buf[o++] = 'I'; buf[o++] = 'R'; buf[o] = 0;

0 commit comments

Comments
 (0)