Repository navigation
PROBE: clangd as an ok image (<arch>-openkal) on every system's okrun - #11
Closed
Sunrisepeak wants to merge 5 commits into
Closed
Sunrisepeak wants to merge 5 commits into
Sunrisepeak wants to merge 5 commits into
Conversation
… okrun, against the native clangd Temporary, CI only; not to be merged. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… ccache kept across failed runs; the product matrix stays off this branch Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… exports it on no ok image); every import beyond kal_* listed; the confusable-chars generator named Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…ed Windows); images can be taken from an earlier run Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…m it); an LLVM Support probe of names and files; okld bundle with one image name Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
This was referenced Oct 29, 2026
Owner
Author
|
Probe concluded (design 2026-10-29 §9.4): clangd stays a native program per system inside the one mcppls payload; the ok-image clangd is not adopted. No change to mcppls-clangd. |
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.
Probe — temporary, CI only, not to be merged.
Question: can this clangd (llvm-project 23.1.0 +
patches/+overlay/, i.e. the v0.0.17 engine23.1.0-mcppls.5) be built once per architecture as an ok image (<arch>-openkal), started by the okrun of Linux x86_64/aarch64, macOS arm64 and Windows x64, and what does it cost against the native clangd of the same source?Method (
probe/openkal/, workflowprobe-openkal.yml; measured run 40908632199): openkal's compile conventions read from mcpp 2026.10.29.1's compile of a plain unit for<arch>-openkal(openkal-platform 0.17.3, openkal-musl 0.22.6, openkal-llvm-runtime 0.16.6) → a CMake toolchain file; CMake builds only the static libraries clangd links (host tablegen native); mcpp links clangd's main over them and seals the image (okld note+okld check); each system runs the cases with the native clangd (v0.0.17 release) and with the image under mcpp-ide 0.1.1's okrun.--check-locations=false, median of 3.Result
__cxa_thread_atexitworkaround; 0 imports beyondkal_*--strip-all53 888 816 B (still passesokld check, runs) ; gzip -9 19.2 MB--versionimport m)__linux__undefined)Building AST...(native ok 1.21 s / 103 MiB)Building AST...(native ok 0.99 s / 102 MiB)Windows, every case (also with
--resource-dirnamed):C:\…andC:/…are relative to LLVM's POSIX path style (sys::path::Style::nativeis decided at compile time), so they are joined to the current directory; the resource directory is the parent ofC:\…\clangd.oke, which POSIX style cannot find; and even a well-formedC:/…name fails to be read (EINVAL, below LLVM; not isolated).What blocked, and whose it is
port/include/features.hdefinesrestrictin C++; clang'sTokenKinds.def(C99_KEYWORD(restrict)) expands it →no member named 'kw_restrict'-Drestrict=restrictpreadlinks but answersENOSYS; a configure check cannot see it (HAVE_PREADfound) → everyMemoryBuffer::getFilefails-DHAVE_PREAD=0mmapanswersENOSYS(LLVM falls back to reading; no page sharing)__cxa_thread_atexitis exported only on__linux__/__Fuchsia__/OPENKAL_TARGET_WINDOWS/__APPLE__→ any image with athread_localthat has a destructor is refused byokld check(minimal repro:thread_local std::string)libcxxabi/src/cxa_thread_atexit.cppguard)__linux__etc.:<machine/endian.h>,getprogpath,is_localopenkal-llvm.patchgetMainExecutableread/proc/self/exe= okrun; must bekal_env_imageopenkal-llvm.patch/proc/self/fd/Nnames the loader's descriptor N →openFileForRead's real path was the directoryopenkal-llvm.patch(dropTRY_PROC_SELF_FD)C:\/C:/name is relative; resource dir not foundkal_env_system)C:/…name failsEINVAL.okedirectly → SIGSEGV; needs loader + image (kal_env_loader);getrlimit/setrlimitunavailable (worker address-space limit)LLVM_HOST_TRIPLE); a Windows host would default to linux-gnu[build] ldflagsare not link inputs: changing them does not relink${mcpp.contract}(mcpp 2026.10.30.1) and mcpp-plugins deps-cmakegen_toolchain.pyCost against native (Linux/macOS, where it runs): parse time +6–42 %; a constant ≈ +90–125 MiB resident (module case 141 vs 50 MiB), consistent with the image's pages being private copies rather than a shared file mapping (#3); start-up ≈ +0.2–0.3 s.
okb of both images: not produced —
okld bundlewants one image name per architecture (fixed in the workflow, not rerun). Estimate from the measured images: ≈ 108 MB stored with--strip-all(≈ 39 MB gzip).Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com