You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(examples, docs): the curriculum covers the new targets, and a warning stops advising what is now refused
EXAMPLE. `examples/13-platform-targets` is one source with no `cfg`, built for
Linux, WebAssembly and both Android ABIs by changing only `--target`. The
curriculum had twelve examples and none for any of the three platforms this
release adds, which is a gap in the one place a reader looks first.
Its host build needs no payload, so it is in BUILD rather than SKIP -- and
that is itself worth one build: a manifest naming targets the runner has no
payload for must still parse and build for the host. The cross legs are not
built there; ci-target-matrix scans every row on four hosts and tests/e2e/641
asserts the vocabulary.
Every claim in its README is measured against the artifact the README
describes, not carried over from another one: the host and wasm runs print
`1-2-3`, both Android artifacts are the file(1) output shown, and the x86_64
artifact was pushed to an API 24 emulator image and executed there.
A MISLEADING WARNING, FOUND BY BUILDING openkal FOR ANDROID. When a project's
target side comes from the dependency graph, mcpp warns that the row's
convention pin was unnecessary and tells the reader to declare their own
default instead. On a capability row both halves of that are false:
warning: ... so gcc@16.1.0 would have served x86_64-linux-android.
State the preference: [target.x86_64-linux-android]
toolchain = "gcc@16.1.0"
$ (declaring exactly that)
error: target 'x86_64-linux-android' cannot be emitted by 'gcc@16.1.0'.
Following the advice replaced a warning with an error. The first claim is false
on its own terms too: this gcc payload cannot emit an Android object whatever
the graph supplies. `graph` answers "who supplies the SYSTEM"; a capability pin
answers "who can emit the FORMAT AND THE SYSTEM", and only the second decides
whether a substitution was avoidable. The warning is now gated on
`pin_is_capability()`, whose row set is asserted exhaustively in
test_toolchain_triple, so the gate cannot silently cover every row.
DOCS: docs/24-openkal-cross.md (+zh) now answers what the three new platforms
mean for openkal, because the answers differ and the difference is where an
implementation sits relative to a C library.
Android shares openkal-linux UNCHANGED. It is written on the Linux
kernel's own system calls and borrows nothing from a C library;
Android's kernel IS Linux, the per-arch syscall ABI is identical,
and sys.h dispatches on __x86_64__/__aarch64__ -- architecture, not
OS. `cfg(os = "linux")` is true for an Android triple, so a
portable program selects it with the line a Linux consumer already
writes. Measured: openkal-linux compiles for both ABIs, and a
program written against openkal alone -- no C library, no
`import std` -- printed `openkal: 1-2-3` with exit 0 on an API 24
emulator image.
iOS would share openkal-macos by the same argument, and the argument
is not evidence: the SDKs are not redistributable, so there is
nothing to build against and the rows claim nothing.
Web needs a NEW implementation and a different shape. Emscripten has no
kernel and no system calls; an implementation would have to sit
ABOVE its C library, which the specification permits and which is
new software rather than a sharing decision. Until then the row is
served the ordinary way, by the `xim:emsdk` payload, which is what
its `verified` tier records.
The docs/21 support table and the two Android rows' Windows cells were also
reconciled with the index: `—` there means no payload is published for that
host, while `toolchain list` still shows the rows, because which hosts an index
serves is the index's answer and not a constant compiled into the engine.
Copy file name to clipboardExpand all lines: docs/03-examples.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,7 @@ the map; the table below is what each sub-example adds.
82
82
|---|---|
83
83
|[`08-build-rules`](../examples/08-build-rules/)| two rule packages and a project using both; `host-module = true`, `mcpp::action` with `role = "check"`|
84
84
|[`12-a-new-device-language`](../examples/12-a-new-device-language/)|`device_extensions` and `rule_module`: a rule package teaching mcpp a language the engine has never heard of, whose compiler is a package built through `tools = [...]` for the build machine |
85
+
|[`13-platform-targets`](../examples/13-platform-targets/)| one source and no `cfg`, built for Linux, WebAssembly and both Android ABIs by changing only `--target`; `min_api_level` as the project's own decision, and a capability pin that cannot be overridden |
85
86
86
87
[31 — Authoring a Rule Package](31-authoring-a-rule-package.md) is the reference
0 commit comments