Commit 595971f
committed
The suite can be given flags of its own, and the portable example builds again
THE PORTABLE EXAMPLE BUILT NOWHERE, AND THE PINS ARE WHY. `src/main.cpp` was
updated for 0.11's `kal_spawn` -- one struct where there had been three
declarations -- and `examples/portable/mcpp.toml` still pinned openkal 0.10.0:
src/main.cpp:256:19: error: 'kal_spawn' does not name a type
identically for the host and for every cross target. A version pin in an
example is a claim about what that example builds against, and nothing was
checking it: the program is not in any package's build, so no repository's
continuous integration compiled it. The four pins now name the published
versions, and the example runs -- 0 observations that did not hold on the host.
AND IT GAINS THE THREE PLATFORMS, WHICH IS TWO LINES AND NOT THREE.
Android NO LINE. `aarch64-linux-android` has `os = "linux"` because the
kernel IS Linux; bionic is a C library above it, and an
implementation written on the kernel's own interface does not know
which C library sits above it. `cfg(os = "linux")` already selects
`openkal-linux` for both ABIs, and an Android line would be a
second name for one answer.
iOS ONE LINE, no package. Darwin is Darwin -- the same traps, the same
call numbers, the same calling convention -- and what differs
between macOS and iOS is the SDK and the deployment-target flag,
which belong to the build tool. `cfg(os = "ios")` matches all
three iOS rows.
Web ONE LINE and new software. `openkal-emscripten` is the first
implementation in this ecosystem written ABOVE a C library, which
clause 2 permits in as many words.
FLAGS THE SUITE ITSELF HAS TO CARRY (`OPENKAL_CONFORMANCE_SUITE_FLAGS`).
`OPENKAL_CONFORMANCE_IMPL_FEATURES` names features of the IMPLEMENTATION, and
for every platform so far that was the whole of what an unusual arrangement
needed. Emscripten is the first where it is not: its thread support is selected
by `-pthread`, which chooses a different C library build, a different memory
model and a different loader contract, so it is a property of the WHOLE LINK.
Measured with the implementation's feature active and the suite built without
the flag:
DID NOT HOLD an execution context starts
DID NOT HOLD four execution contexts start
DID NOT HOLD contexts that ran at the same time have identities distinct
which is the suite being right: if `openkal.task` is provided, a context
starts. The variable adds the flags to the suite's compile AND link, because a
flag that selects a memory model must reach every translation unit and the
link, and one that reached half would produce a suite whose halves disagree.
It does not yet reach far enough, and that is recorded rather than papered
over: the specification package's own modules are compiled without it, so a run
with the variable set now fails with
error: POSIX thread support was disabled in precompiled file
'.../pcm.cache/openkal.types.pcm' but is currently enabled
A whole-graph flag channel is an engine change; `openkal-emscripten` gates the
interface behind a feature so that the absence is a link error rather than a
present-and-failing operation, and its README carries the rest.
AND THE FEATURE STAMP HAS TWO AXES NOW. The paragraph in this script about a
feature-set change not invalidating the build applies to the new variable
identically, and the first run that used it reported the previous run's build:
a module cache compiled without the flag. The record is now `features|flags`.
`check-surface.sh` TAKES `$NM`. A wasm object is not an ELF, and the host's
binutils `nm` reports "file format not recognized" for one; the reader that
does read it ships with the toolchain that produced it. Named in the
environment like the runner and the features, with the default unchanged. Same
class of defect as the leading-underscore note beside it, and found the same
way: by writing another implementation.1 parent 26e32ec commit 595971f
4 files changed
Lines changed: 183 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
14 | 27 | | |
15 | | - | |
| 28 | + | |
16 | 29 | | |
17 | 30 | | |
18 | | - | |
| 31 | + | |
19 | 32 | | |
20 | 33 | | |
21 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
36 | 49 | | |
37 | 50 | | |
38 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
111 | 152 | | |
112 | 153 | | |
113 | 154 | | |
| |||
143 | 184 | | |
144 | 185 | | |
145 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
146 | 200 | | |
147 | | - | |
| 201 | + | |
| 202 | + | |
148 | 203 | | |
149 | 204 | | |
150 | 205 | | |
| |||
170 | 225 | | |
171 | 226 | | |
172 | 227 | | |
173 | | - | |
| 228 | + | |
174 | 229 | | |
175 | 230 | | |
176 | 231 | | |
| |||
0 commit comments