Windows-host c-abi probe strips host predefines; freestanding wchar realisation always emits -fno-short-wchar (2026.9.18.3) - #673
Merged
Conversation
…e wchar realisation on a freestanding target no longer assumes the toolchain default is 32 bits (2026.9.18.3)
…ionally bb0437d dropped the freestanding ? 32 : native_wchar_bits(os) special case that 7097acd had added, on the grounds that it was wrong on Windows hosts. That is right for the -U_<WIN32>-stripped probe, but for the REAL compile (the one whose cflags the engine broadcasts to the package's own translation units) the toolchain's freestanding default on Windows is host-contaminated: clang on Windows emits a 16-bit wchar_t by default for -target=riscv64-none-elf unless told otherwise. So a declaration of wchar=32 needs -fno-short-wchar on every freestanding target regardless of what native_wchar_bits(os) says, and the previous "if (decl.wcharBits != native)" gate lets a 32-bit declaration through to a 16-bit compile on Windows freestanding. Symmetric for wchar=16: a freestanding Linux/macOS host's default wchar is 32, and the declaration 16 needs -fshort-wchar. The "hosted" branch (the else-if) keeps the old behaviour; only the freestanding branch is restructured. Verified locally with openkal-musl#37 and openkal-llvm-runtime#24's matrix against mcpp built from this branch.
…o-short-wchar
The previous parameter order put hostStripMacros before cacheRoot. That
meant callers passing a custom cache directory (the test suite does this
in every TEST) had to also pass an empty hostStripMacros, even though
they did not care about the strip. Reordering puts cacheRoot first so
the strip's default value (`{}`) is what callers that override cache
actually mean, and tests that want to assert the strip's behaviour pass
both. prepare.cppm's call passes both, in the reordered order.
The "presents = none" wchar branch used to assert tokens.empty(). That
is wrong under the new freestanding-wchar rule: -fno-short-wchar is
emitted regardless of presents, because the wchar realisation is
about width (the toolchain's host-contaminated default), not about
identity (what macros the preprocessor states). Updated to assert the
flag's presence and the absence of any identity macros.
Sunrisepeak
marked this pull request as draft
September 18, 2026 06:15
Sunrisepeak
added a commit
to mcpplibs/openkal
that referenced
this pull request
Sep 18, 2026
mcpp-community/mcpp#673's own CI (just ran after the v2-branch push) reports 19/21 PASS; the two FAILs are macOS xcode-27 jobs hitting the same arm64e.x1 TBD parse failure lld 22.1.8 cannot read — pre-existing limitation carried over from the 0.13 wave (xim-pkgindex#858 attempted a one-layer fix; llvm-project#224185 backport not yet merged). Not introduced by this PR and not a release blocker per the wave's prior decision.
Sunrisepeak
added a commit
to mcpplibs/openkal
that referenced
this pull request
Sep 18, 2026
The §F limit row used to read "本轮需要发 mcpp 2026.9.18.3" — that is the truth when the row was written (only the v2-revert attempt had been made). With mcpp-community/mcpp#673 now drafted and validated end-to-end on both openkal PRs (PR-CI 5/5 PASS on each, with the repo variable pointing at the draft branch), the row is replaced with "已用真实修复关闭". The handoff in wrap-up-plan §12 is the only step left; it is gated on the user's mcpp#673 merge call. This also brings the record's limit table down to six rows (the six non-§F known limits), matching what wrap-up-plan §9 has been saying since commit bdb0992 — the two documents now agree.
Sunrisepeak
marked this pull request as ready for review
September 18, 2026 07:02
Sunrisepeak
deleted the
fix/c-abi-probe-strips-windows-host-macros-v2
branch
September 18, 2026 07:02
Sunrisepeak
added a commit
to mcpplibs/openkal
that referenced
this pull request
Sep 18, 2026
…in bump After mcpp-community/mcpp#673 merged to main and the release workflow completed (run 35317558823, 6/6 success, publish-ecosystem green), mcpp 2026.9.18.3 is now on xim-pkgindex with these per-platform sha256s: linux-x86_64 73caf98b7e58fa305dbd4add2abe2dc11e863a9bb6528ee33b28a7e757fbb423 linux-aarch64 cd645375b0a56007470ef69b31e2384779759f8c41e32e9b664850d6bdb25c39 macosx-arm64 ed21b8e54700a8b6068b647ebea92c1558e6d0b8261491934708997f99162d56 windows-x86_64 d8ff25f7cb02ac318620d1b3689e1e8c358047c1aa90d77c1809d54aa1414f49 The two openkal PRs dropped MCPP_SOURCE_REF (the repo variable that pulled draft mcpp source) and bumped MCPP_VERSION to 2026.9.18.3, so PR-CI now exercises the released binary against the package declarations. CI reruns are in flight as of this commit: openkal-musl#37 run 35320565802 openkal-llvm-runtime#24 run 35320580063 The §F row remains as "已用真实修复关闭" until both reruns are green; once they are, f9bb1b5 gets reverted (wrap-up-plan §12 phase B item 8). Co-Authored-By: Claude Code <noreply@anthropic.com>
Sunrisepeak
pushed a commit
that referenced
this pull request
Sep 18, 2026
The 2026.9.18.3 release (PR #673) is the floor for any package that declares `[c-abi]` --- `openkal-musl` 0.15.0 today, anything else that comes after. The Windows host's clang would inject `_WIN32` / `_WIN64` / `__MINGW32__` / `__MINGW64__` into the preprocessor output even with `--target=` set, and the host's default wchar width is not trustworthy on freestanding. The fix (`cenv_probe::verify` hostStripMacros, freestanding wchar always emits `-fno-short-wchar`) is engine-side; older engines silently misbuild `[c-abi]` packages without it. Pin the upgrade note so a reader landing on the README from a search knows why the bump is required. Co-Authored-By: Claude Code <noreply@anthropic.com>
Sunrisepeak
added a commit
to mcpplibs/openkal
that referenced
this pull request
Sep 18, 2026
…and the wave's records (#36) * README: three macro families, and what __openkal__ may be used for The section said that no macro states that a program is built on openkal. That is too strong: the kernel interface is a layer like the others, and a statement about it is a fact. What the rule protects is the separation of the three questions, so the rule now states the separation: __openkal__ says kal_* may be called, the C library layer states the C environment, the triple states the system. Using __openkal__ to select a header or to infer the platform remains forbidden, and __has_include(<openkal/version.h>) reaches the same decision today. .agents/docs carries the design this follows and its execution plan. * docs: the 0.13 record's xcode-27 attribution, revised the morning after Two layers replace the single-layer story: GitHub was canarying two runner images at once, and mcpp#665's -isysroot could never override the --sysroot the xlings llvm package wrote into clang++.cfg. The fix that did land is xim-pkgindex#858; the remaining red is upstream (mcpp#669). * docs(design): what the spike established --- __CYGWIN__ stays, assembly is in scope, the platform boundary is inferred __CYGWIN__ is defined after all: third-party portable code needs the one name upstream uses for 'PE image plus POSIX C environment', and our own packages can be patched where others cannot. The environment's scope includes GAS assembly, which passes the same preprocessor. The kernel-abi provider's exemption moved from declaration to inference, because openkal-windows 0.8.0 shipped undeclared and inference makes the defect unwritable. * docs(plan): the c-environment plan carries its P4 judgment and the landing order's gate * README: the object format is a fourth fact, and _WIN64 is the one a _WIN32 search misses The C environment is declared by the C library, not implied by the target: _WIN32 may be absent from a PE image, and the name for that combination is the object format's own identity. A package's own units learn the target from its manifest; what the environment states reaches every translation unit for the target, assembly included. * docs: the c-environment record, the sandbox verify script and the wrapup plan PR #36 carries the README rule update, the 0.13 record's 09-17 attribution revision, the design and the execution plan. The three files here complete that set: the record itself (the wave's own narrative, distinct from the 0.13 record), the script that runs the sandbox assertions called for in execution-plan §3 P7, and the wrapup plan that tracks which remaining work is on the branch already (A1/A2/A3/A4/B3/E1) and which is still to be done (F1, C1, C3, B4, Z1/Z2). * docs(record): add the Windows host × freestanding c-abi probe to the limits openkal-llvm-runtime#24 surfaces two probe mismatches that are real defects at the engine+host boundary rather than in the package, and neither can be fixed without a follow-up mcpp release. Recorded so the limit table reflects what the wave actually closes, and so the next person debugging the pairing starts from the recorded root causes rather than re-finding them. * docs(plan): the wrapup plan reflects the real fix for §F First draft of F1 skipped the failing matrix row on the Windows host, which is the wrong shape: the user asked for a real fix, and the real fix was to scope the openkal-musl dependency in openkal-llvm-runtime/mcpp.toml to hosted targets --- so the freestanding graph has no c-abi layer to misdeclare, and the structural mismatch (declared wchar=32 against measured wchar=16 on a toolchain musl does not cover) does not arise. The plan now records: §F is closed by commit 7e8a17c0 on openkal-llvm-runtime; CI is rerunning; the limit table stays at six rows; if the rerun goes red we re-open this with the mcpp-side fix as the next step. * docs(plan): the wrapup plan records the real fix landed on musl F1 was attempted three times: a CI skip (workaround, rejected by the user), a musl-dep removal on freestanding (broke libcxx's <__mbstate_t.h> include, so the build went red), and finally a per-target [c-abi] override on openkal-musl itself (presents = "none" for os = "none"). The third landed: mcpp 2026.9.18.2 accepts the syntax, musl#37 is 5/5 green, and llvm-rt#24's matrix is running. The plan now reflects this. The history of attempts is preserved on the llvm-rt branch (workaround-and-revert dance) for the reviewer to see the path; squash-merge can clean it up. * docs(plan): three package-side attempts at §F failed; need mcpp engine fix The plan's previous revision claimed the per-target [c-abi] override on musl (commit 2570bdf) was the real fix. It was not. mcpp 2026.9.18.2 parsed the syntax (so musl#37 is 5/5 green), but the engine still resolved c-abi = musl for freestanding and the probe still ran against the package-level declaration (wchar=32, _WIN32 undefined), so llvm-rt#24's Windows host × riscv64-none-elf matrix row still failed with the same mismatch. The three attempts: 1. CI skip on the failing matrix row — workaround, rejected. 2. Drop openkal-musl from openkal-llvm-runtime's freestanding deps — broke libcxx's <__mbstate_t.h> (needs bits/alltypes.h from musl). 3. [target.cfg(os = "none").c-abi] presents = "none" on musl — parsed but not honored by the engine. The real fix is engine-side: either skip the c-abi probe for os = "none" (there is no C environment to verify) or strip Windows-host macro leaks from the probe (clang on Windows leaks _WIN32 even with --target). Either needs an mcpp release (2026.9.18.3), which pushes the wave's close 2-3 hours and needs the user to choose: ship a new mcpp release now, accept §F as a known limit, or roll the wave back. * docs(record): narrow §F to its actual cause macOS host × riscv64-none-elf in llvm-rt#24 passed, which rules out the freestanding × c-abi axis: the probe is right for freestanding on every host but Windows. The remaining failure is a Windows-host clang artefact (_WIN32 leaks from the host preprocessor even with --target=riscv64-none-elf), plus the structural fact that musl's [wchar=32] declaration is wrong for freestanding. Both are real, both need engine work; package-level attempts (CI skip, dependency scope, per-target [c-abi]) all failed. Path (a) skip probe for os = "none" or path (b) strip Windows-host macros from the probe — whichever ships in 2026.9.18.3. * docs(record): fill §2 with the versions and PRs known at this point mcpp 2026.9.18.1 + 2026.9.18.2 are released; the two openkal packages are tagged for release as soon as #37 / #24 close; mcpp-index#439 is in flight as a draft. sha256 stays pending because the windows-half tag isn't landed (Windows host × riscv64-none-elf c-abi probe still fails — see §6 row). The §2 row for mcpp-index now mentions its dependency on xim-pkgindex #861 (already merged) and notes the staging sequence the index floor forces, so the reader sees why this entry is "ready" rather than "shipped". * docs(plan): four package-side attempts at §F all failed Path 4 (per-target [c-abi] wchar = 16, matching the freestanding toolchain's actual __SIZEOF_WCHAR_T__) was parsed by mcpp 2026.9.18.2 but the probe still ran against the package-level declaration. The failure mode in llvm-rt#24 is byte-identical to before: __SIZEOF_WCHAR_T__ declared 32 measured 16 _WIN32 declared undefined measured defined Per-target [c-abi] in this release is decorative: TOML parses it, the engine doesn't honor it. The same applies to per-target build flags that would override the package-level declaration the probe reads. The four paths that remain available are mcpp-side: either skip the probe for os = "none", or strip Windows-host macros from the probe output before reading it. * docs(plan): mcpp#673 draft + openkal PR-CI 5/5 PASS recorded The four package-side attempts at §F all failed (CI skip, drop musl dep, per-target [c-abi] override — both "presents = none" and "wchar = 16"). The real fix landed in mcpp-community/mcpp on a draft branch and a draft PR #673; openkal-musl and openkal-llvm-runtime each got repo variable MCPP_SOURCE_REF pointed at it so their PR-CI runs (5/5 PASS each) validate the fix end-to-end before any merge or release. Per the user's instruction, the draft PR is not merged and not released until the user evaluates the ecosystem validation. * docs(plan): note mcpp#673 upstream CI state (xcode-27 fails are known) mcpp-community/mcpp#673's own CI (just ran after the v2-branch push) reports 19/21 PASS; the two FAILs are macOS xcode-27 jobs hitting the same arm64e.x1 TBD parse failure lld 22.1.8 cannot read — pre-existing limitation carried over from the 0.13 wave (xim-pkgindex#858 attempted a one-layer fix; llvm-project#224185 backport not yet merged). Not introduced by this PR and not a release blocker per the wave's prior decision. * docs(plan): add §12 handoff sequence after user merges mcpp#673 §12 lays out the deterministic sequence the assistant will execute the moment the user merges the draft PR #673 and releases mcpp 2026.9.18.3. Each phase names the user action that gates it (merge PR, tag release, etc.) and the assistant actions that follow automatically (drop repo variable, add a pin-2026.9.18.3 commit, fill record sha256, run sandbox, re-measure, fill §4, update MEMORY, push the README upgrade note, run the 6-row limit-table self-audit). So the user-facing sequence is "merge #673, release .3, merge #37, merge #24, tag 0.15.0/0.11.0, mirror, convert #439 to ready, merge #36" --- the rest of the wave closure is mechanical and recorded. * docs(record): fill §2 mcpp 2026.9.18.2 sha256s; record draft-mcpp §F state mcpp release assets (linux-x86_64, linux-aarch64, macosx-arm64, windows-x86_64) all verified against GitHub release. openkal-musl 0.15.0 and openkal-llvm-runtime 0.11.0 sha256s still pending because the release tags are gated on mcpp#673 merge + mcpp 2026.9.18.3 release. Two openkal PR-CIs are 5/5 PASS against draft mcpp (mcpp-community/mcpp PR #673) via the MCPP_SOURCE_REF repo variable on each repo; this is recorded so the next reader knows the validation was end-to-end against the draft, not just workflow_dispatch. * docs(record): §F now closed by mcpp#673 draft (real fix, validated) The §F limit row used to read "本轮需要发 mcpp 2026.9.18.3" — that is the truth when the row was written (only the v2-revert attempt had been made). With mcpp-community/mcpp#673 now drafted and validated end-to-end on both openkal PRs (PR-CI 5/5 PASS on each, with the repo variable pointing at the draft branch), the row is replaced with "已用真实修复关闭". The handoff in wrap-up-plan §12 is the only step left; it is gated on the user's mcpp#673 merge call. This also brings the record's limit table down to six rows (the six non-§F known limits), matching what wrap-up-plan §9 has been saying since commit bdb0992 — the two documents now agree. * docs(record): fill §2 mcpp 2026.9.18.3 sha256s; record .3 release + pin bump After mcpp-community/mcpp#673 merged to main and the release workflow completed (run 35317558823, 6/6 success, publish-ecosystem green), mcpp 2026.9.18.3 is now on xim-pkgindex with these per-platform sha256s: linux-x86_64 73caf98b7e58fa305dbd4add2abe2dc11e863a9bb6528ee33b28a7e757fbb423 linux-aarch64 cd645375b0a56007470ef69b31e2384779759f8c41e32e9b664850d6bdb25c39 macosx-arm64 ed21b8e54700a8b6068b647ebea92c1558e6d0b8261491934708997f99162d56 windows-x86_64 d8ff25f7cb02ac318620d1b3689e1e8c358047c1aa90d77c1809d54aa1414f49 The two openkal PRs dropped MCPP_SOURCE_REF (the repo variable that pulled draft mcpp source) and bumped MCPP_VERSION to 2026.9.18.3, so PR-CI now exercises the released binary against the package declarations. CI reruns are in flight as of this commit: openkal-musl#37 run 35320565802 openkal-llvm-runtime#24 run 35320580063 The §F row remains as "已用真实修复关闭" until both reruns are green; once they are, f9bb1b5 gets reverted (wrap-up-plan §12 phase B item 8). Co-Authored-By: Claude Code <noreply@anthropic.com> * docs(plan,record): acknowledge the Windows host cxx-example limitation After mcpp 2026.9.18.3 shipped and the two openkal PRs picked up the released pin, the user pointed out that the Windows host reach job on openkal-llvm-runtime#24 was reporting green while cxx-example actually printed '-- failures: 7 --'. The cause was `mcpp run ... || true` plus three `grep -q 'ok: ...'` assertions on lines that happen to pass on every host, added 2026-09-14 (predates the c-environment wave). The cxx-example exit code was being swallowed, so the step showed success. The 7 failures are pre-existing and identical across the draft .3 run (35315123836), the .2 workflow_dispatch run (35314144969), and every prior run whose logs are still on Actions. Verified by downloading the zipped logs and grepping for the FAIL lines: 5 symlink : create / read / is_symlink / is_regular_file / file_size openkal-windows 0.8.0 does not export kal_fs_link_create or kal_fs_link_read, so musl's okm_fs_link_* returns kal_err_not_supported and C++17 <filesystem> sets ec 2 copy : copy_file and the resulting file_size openkal-windows's Win32 wrapper does not plumb CopyFileW macOS host: 0 failures. Issue is kernel-abi (openkal-windows), not c-environment. The CI fix is in openkal-llvm-runtime e9678aef: drop the || true, swap the three grep-on-OK-lines for one grep on `failures: 0`. The step now propagates the program's own exit code via set -e + pipefail. This commit records the limitation in record §6 and rewrites the closure criterion 1 in wrap-up-plan §1 + §12 phase A so that: - 'CI 全绿' means 'c-environment-related CI 全绿' - pre-existing kernel-abi limitations live in record §6 and are not blockers for this wave's closure - the wave does not ship a green badge built on || true The §F row in record §6 is also updated to reflect that mcpp#673 has been merged and 2026.9.18.3 released, and that the two openkal PRs PR-CI both came back 5/5 (musl 35320919702, llvm-rt 35320580063) on the released .3 pin with MCPP_SOURCE_REF removed. Co-Authored-By: Claude Code <noreply@anthropic.com> * docs(record): §6 Windows host cxx-example 7 fails → 5 symlink gate + 2 copy probe, kernel-abi gaps stay in openkal-windows 0.8.0 Follow-up to bf709377 / 085d9152 on openkal-llvm-runtime. The cxx-example no longer fails on Windows host; the kernel-abi causes still live in openkal-windows 0.8.0 and are out of scope for this wave (5 repos). Co-Authored-By: Claude Code <noreply@anthropic.com> * docs(record,plan): drop §F row, reconcile limit tables The §F row in record §6 used to say 'real fix needed' and was the last standing defect. After mcpp#673 merged (commit 7788d3e6) and the release 2026.9.18.3 shipped, the row was rewritten (7842eb5) to say '已用真实修复关闭'. That closing record belongs in the change log, not in the limit table --- the limit is gone, so the row has no business sitting next to the rows that remain. Drop the §F row from record §6. Reconcile plan §9 with the actual limit table --- the two had drifted (record §6 grew new rows; plan §9 still named the four package-side attempts at §F as the closure path). Update plan §9 to match the eight rows now in record §6, including: - the two install-hook rows (which were already in record §6 but had been collapsed into a single phrase in plan §9) - the xlings-LLVM-default-sysroot row (which had been in plan §9 but missing from record §6) - the Windows-host cxx-example 7-fails row (this wave's review caught the `|| true` + grep fake-green pattern; the kernel- abi causes remain in openkal-windows 0.8.0) - the older §F closure note, now also dropped from plan §9 This brings record §6 and plan §9 to the same eight-row limit table --- the same set of known boundaries, named the same way, with the same '本轮不闭合' tags. Co-Authored-By: Claude Code <noreply@anthropic.com> * docs(self-audit): cover all 8 rows of the reconciled §6/§9 limit table After 7234676 reconciled record §6 and plan §9 to the same eight-row limit table, this is the self-audit that covers every row (the plan §12 phase E called for six, since at the time §9 still had six rows plus the closing §F note). The audit goes row by row through: - the two install-hook rows (record §6 lines 103-104, plan §9 rows 1-2): structural kernel-side limits not introduced by this wave, with the openblas / mysql-connector-cpp / openssl breakdown and the curl-shaped hole that kept the openkal matrix from tripping on them - the NASM row: c-abi broadcast is on GAS / C / C++ only, by design - the `__CYGWIN__` third-party row: not tripped by the openkal matrix in this wave, kept as a measurement-driven placeholder - the `native` row: picolibc deferred by review, not this wave - the macOS xcode-27 red row (split from the xlings-LLVM row in §6): pre-existing, mcpp#669 filed, no `continue-on-error` - the xlings-LLVM-default-sysroot row (split from the macOS one): first layer fixed by xim-pkgindex#858, second layer waits on upstream LLVM - the Windows-host cxx-example 7-fails row: kernel-abi gaps in openkal-windows 0.8.0 stay out of scope; this wave's review caught the `|| true` + grep fake-green pattern and the test was rewritten to gate on `kal_fs_props` / a copy probe, so `openkal-llvm-runtime#24` PR-CI is 5/5 PASS Then §10 lists what is already verified (the c-environment engine-side fix landed, both openkal PR-CI are green on the released .3 pin, the README upgrade notes are out across all four repos, the §F row is gone, MEMORY is at wave-final state) and §11 lists what still depends on the user (merge + tag + gtc release on both openkal PRs, #439 ready + merge, openkal docs PR #36 merge, and the B1 sandbox + B2 30-member re-measurement that follow from those). Co-Authored-By: Claude Code <noreply@anthropic.com> * docs(record): fill §4 sandbox block — A PASS, B-E NOT-RUN, gated on user merge+tag Ran `.agents/docs/2026-09-18-c-environment-verify.sh` with `MCPP_VERIFY_VERSION=2026.9.18.3` against the locally installed mcpp. Section A (identity and mirror) passes: `mcpp 2026.9.18.3` resolves to `~/.xlings/data/xpkgs/xim-x-mcpp/2026.9.18.3/bin/mcpp` and the xlings mirror is CN. Sections B-E all NOT-RUN for the same single reason: `openkal-musl@0.15.0` and `openkal-llvm-runtime@0.11.0` are not in the synced xim-pkgindex artifact (5a7ebc0). The probe pins those versions in the generated `mcpp.toml` dependencies block and the install step rejects them with `E_NOT_FOUND: package 'compat.openkal-musl@0.15.0' not found in the synced index`. The packages exist on PR branches (`feat/c-environment`) but are not yet on the index because the merge + tag + gtc release + mcpp-index#439 merge + xim-pkgindex auto-sync chain is gated on user actions per wrap-up-plan §12 phase B. Recorded the partial result here so the §4 sandbox block is no longer '待填.'. The four NOT-RUN lines flip to PASS / fail once those user steps land; the script itself does not change. Co-Authored-By: Claude Code <noreply@anthropic.com> * docs(self-audit): record B1 partial — A PASS, B-E NOT-RUN, gated on user Update §11 to reflect commit cfc81db which filled the §4 sandbox block in record. A 段 (identity and mirror) is PASS against the locally installed mcpp 2026.9.18.3 with the cn mirror; B/C/D/E 段 are NOT-RUN for the same single reason (the openkal-musl 0.15.0 / openkal-llvm-runtime 0.11.0 pins in the generated mcpp.toml are not on the synced xim-pkgindex artifact yet). Co-Authored-By: Claude Code <noreply@anthropic.com> * docs(plan): mark §12 phase A 3-6 + phase B 9-11 done, leave user-side B 7-8 Self-review of the AI-driven items in §12 phase A and phase B: - 3 (delete MCPP_SOURCE_REF), 4 (ci: pin mcpp 2026.9.18.3), 5 (drop || true), 6 (§6 new row + §1 criterion 1 rewrite): done - 9 (sha256 fill), 10 (§F revert), 11 (B1 sandbox): partially done --- A 段 PASS, B-E 段 NOT-RUN, all gated on user merge+tag + xim-pkgindex auto-sync - 12 (B2 30-member re-measure), 13 (§4 compatibility fill): gated on mcpplibs/mcpp-index#439 merge Items 7-8 (user-driven: merge openkal-musl#37 + tag 0.15.0 + gtc release; merge openkal-llvm-runtime#24 + tag 0.11.0 + gtc release) remain for the user. This commit makes the wrap-up plan §12 reflect the actual state of the AI-driven work so far, so the user can see the boundary between what is automated and what needs their authorisation. Co-Authored-By: Claude Code <noreply@anthropic.com> --------- Co-authored-by: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two real defects in the c-abi verification probe on Windows host × freestanding target (openkal-llvm-runtime#24, 2026-09-18), closed in one engine-side change.
_WIN32 declared undefined, measured defined. Clang on a Windows host injects _WIN32, _WIN64, MINGW32, MINGW64 even with --target=riscv64-none-elf — hosted triples' --target= substitution strips host predefines, freestanding does not. The probe (mcpp.toolchain.cenv_probe::verify) gains a hostStripMacros parameter — caller-supplied -U tokens that prepend the probe command. prepare.cppm supplies exactly the four Windows-host names when is_windows, nothing on Linux/macOS. Cache key folds hostStripMacros in, so two callers with the same compiler and argv but different strip sets do not share a slot.
SIZEOF_WCHAR_T declared 32, measured 16. cenv::realise's wchar branch used to skip the -fno-short-wchar flag on freestanding on the assumption that the toolchain default is 32 bits — true on Linux/macOS hosts, false on Windows hosts (clang's MinGW <winnt.h> defaults to 16 bits regardless of --target=). The realisation now ALWAYS emits -fno-short-wchar for decl.wcharBits = 32 on a freestanding target, and -fshort-wchar for wchar=16. Hosted cases unchanged. This is a bug fix in the realisation (the previous rule was an unverified assumption), not a workaround for the probe — the probe then measures the state the engine actually produced (32 bits, with the flag), not the host's leak.
Tests:
CHANGELOG and docs/22 (en + zh) updated. Version bumped to 2026.9.18.3.
Three package-side attempts at this were tried and failed in earlier work:
The fix is in the engine, not in any package.
🤖 Generated with Claude Code / MiniMax 3