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
{{ message }}
Repository navigation
Commit 7097acd
Browse filesBrowse the repository at this point in the historyBrowse files
"Already satisfied" and "cannot be done" were the same refusal; three
repositories hit the same shape within a day of 2026.9.18.1
Three regressions from 2026.9.18.1, all one shape: the engine treated a
target already satisfying a [c-abi] declaration and a target being unable
to realise it as the same case, so it either refused a compiler it never
needed to, or refused a target it could have realised.
1. GCC on Linux was refused for a package merely DECLARING [c-abi], before
realisation ran at all. openkal-musl 0.15.0's own declaration on Linux
(presents = "posix", data-model = "arch-default", wchar = 32) realises
to nothing -- Linux's default triple already is that -- so nothing
about it needed Clang. Every GCC user of openkal-musl on Linux lost the
package for a substitution nothing asked GCC to perform. Fixed by
reordering: cenv::realise (a pure function of the declaration and the
target, not the compiler) runs first, and the Clang-only gate fires
only when the result is non-empty. Windows is unchanged: the
Cygwin-flavoured substitution there is non-empty, so a non-Clang
compiler is still refused, naming what it cannot do.
2. macOS does not satisfy presents = "posix" by default -- caught by the
verification probe on a real build (declared __unix__ defined, measured
undefined), which is exactly the class of error that probe exists to
catch. Apple's clang predefines __APPLE__/__MACH__ on its default
triple, never __unix__; the original design text assumed macOS already
presented it the way Linux does.
3. A freestanding target had no realisation for presents = "posix" at all,
refused outright, which blocked openkal-llvm-runtime on riscv64-none-elf
before it reached any other target.
2 and 3 dissolve into the same one-line rule, simpler than what it
replaces: realising presents = "posix" means the same observable fact
everywhere -- __unix__ defined, _WIN32 not -- and targets differ only in
what it costs. Linux: nothing. macOS and freestanding: one token,
-D__unix__ -- neither already defines it, for the identical reason.
Windows: the Cygwin-flavoured substitution. Known cost, left to the
mcpp-index 30-member measurement to weigh: #ifdef __unix__ ... #elif
defined(__APPLE__) now takes the Unix branch on macOS too.
Tests: test_cenv.cpp pins the GCC/Linux-accepted and GCC/Windows-still-
refused halves via cenv::realise directly (MacosPosixArchDefaultDefinesUnix,
FreestandingPosixDefinesUnix, FreestandingWindowsIsStillRefused);
test_cenv_probe.cpp adds the token cenv::realise now produces for macOS/
freestanding handed to a real compiler, proving the probe agrees with it;
e2e 742 reproduces the GCC/Linux regression against a real build (fails
without this fix) and pins GCC/Windows still refused.
Version bump: 2026.9.18.1 shipped these regressions; downstream needs a
release with the fix, so this is 2026.9.18.2.
Copy file name to clipboardExpand all lines: docs/22-target-side.md
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -361,11 +361,42 @@ that names no C library:
361
361
| Target | Request | Realisation |
362
362
|---|---|---|
363
363
| Linux |`posix` / `arch-default`| the default triple already satisfies it |
364
-
| macOS |`posix` / `arch-default`| the default triple already satisfies it |
364
+
| macOS |`posix` / `arch-default`| one token, `-D__unix__` — Apple's clang predefines `__APPLE__`/`__MACH__` on its default triple, never `__unix__`|
365
+
| freestanding |`posix` / `arch-default`| the same one token, `-D__unix__`, for the same reason: nothing here defines it either |
365
366
| Windows |`posix` / `arch-default`| Cygwin-flavoured: `--target=x86_64-pc-cygwin` on the compile line only; `__CYGWIN__`/`__CYGWIN32__` are left defined (see the note below); `data-model` becomes LP64 as a consequence of the triple, not a separate flag |
366
367
| any |`builtins = "iso"`| turns off code-generation idioms that assume a platform C library — `-fno-builtin-memset_pattern16` on Apple targets is the one this survey measured; see `src/toolchain/cenv.cppm` for what else was checked and found not to apply |
367
368
| anything else || refused, naming the target, the request and what is missing — never a silent downgrade |
368
369
370
+
**The macOS and freestanding rows are a correction, not the design's original
371
+
text (coordinator revision, caught by real builds within a day of
372
+
2026.9.18.1 shipping).** The rule realising `presents = "posix"` follows is:
373
+
the SAME observable fact on every target — `__unix__` defined, `_WIN32`
374
+
not — and targets differ only in what realising it COSTS. The original text
375
+
assumed macOS's default triple already presented it, the way Linux's does;
376
+
the verification probe (below) caught that assumption as false on a real
377
+
build — declared defined, measured undefined — which is precisely the class
378
+
of error that probe exists to catch. The original text also refused a
379
+
freestanding target outright for asking `presents = "posix"` at all, which
380
+
blocked a whole target (`riscv64-none-elf`, openkal-llvm-runtime) rather
381
+
than realising a fact this engine can in fact deliver: a freestanding target
382
+
starts with neither macro defined, exactly like macOS's default triple, so
383
+
the fix costs it the identical token. Known cost, left to the mcpp-index
384
+
30-member measurement to weigh: portable code written
385
+
`#ifdef __unix__ ... #elif defined(__APPLE__)` now takes the Unix branch on
386
+
macOS too, correct only if that branch is written to also be correct there.
387
+
388
+
**A compiler is refused only when the realisation actually needs a token it
389
+
cannot take — not merely because `[c-abi]` is declared.**`cenv::realise`
390
+
(above) runs first, as a pure function of the declaration and the target;
391
+
the Clang-only requirement is checked second, and only fires when the
392
+
resulting tokens are non-empty. openkal-musl's own declaration on Linux —
0 commit comments