Skip to content

mcppls-clangd 0.0.24: a module that includes <Windows.h> for a 32-bit Windows target builds (mcpp-language-server #100) - #25

Merged
Sunrisepeak merged 4 commits into
mainfrom
fix/issue-100-msasm-module-builds
Nov 26, 2026
Merged

Sunrisepeak merged 4 commits into
mainfrom
fix/issue-100-msasm-module-builds

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Owner

Fixes mcpp-language-server #100.

Cause (not the one the report suggests; the engine has always built X86): clang parses MS-style __asm { } with the target's MC and assembly parser. clangd registered only the target infos, so winnt.h's Int64ShllMod32 family (under _M_IX86) raised "MS-style inline assembly is not available: target MC unavailable". The editor path hides that diagnostic; a module build cannot: PCHGenerator writes no module interface once an error has been reported, and an error cannot be remapped to a lesser severity, so the module and every importer failed.

Change: patch 0049 (UP-42): clangDaemon links X86Desc + X86AsmParser when X86 is built; clangdMain registers them before anything compiles, the module worker included.

Evidence: reproduced on the unmodified series on Linux (--target=i686-pc-windows-msvc, a module with an __asm block; supervised worker and in-process builder both fail, the importer reports module 'a' not found); with the patch both build and report 0 errors. ClangdTests passes whole (1520 cases) with the new MSAsmModulesTests. Cold/warm --check of a 30-module importer unchanged within spread. Cost: +4.4 MB in the native clangd.

Not carried: #19 (ok image worker diagnostics on disk): needs openkal's process-start API; noted at WorkerDiagnostics and in the ledger.

Design: .agents/docs/2026-11-26-issue-100-engine-batch-design.md in mcpp-language-server. The product PR tests this build through engine-candidate.json before merge.

… Windows target builds (mcpp-language-server #100)

clang parses MS-style `__asm { }` (winnt.h's Int64ShllMod32 and siblings, under _M_IX86) with the target's MC and assembly parser, and clangd registered only the target infos: "MS-style inline assembly is not available: target MC unavailable". The editor path hides that diagnostic, but a module build cannot: clang writes no module interface once an error was reported, so the module and every module importing it failed to build. The report took it for a missing X86 target; the engine has always built X86.

- patch 0049: clangDaemon links X86Desc and X86AsmParser when X86 is built, and clangdMain registers them before anything compiles (the module worker included). Unit cases in PrerequisiteModulesTest.cpp (MSAsmModulesTests): in-process and worker builds of an asm module, a real error beside asm still fails.
- Reproduced on the unmodified series (Linux, i686-windows-msvc, supervised worker and in-process builder), fixed on the patched one; whole ClangdTests suite passes; the native clangd grows by 4.4 MB.
- Engine 23.1.0-mcppls.13, release 0.0.24. Not carried: #19 (the image's worker diagnostics on disk; needs openkal's process-start API), noted at WorkerDiagnostics and in the ledger.

Co-authored-by: speak-agent <[email protected]>
Sunrisepeak and others added 3 commits November 26, 2026 03:35
…d a missing library stops the step; the fixture of the product's Windows case is named by its name

Co-authored-by: speak-agent <[email protected]>
…h64 image that linked it ended by SIGBUS

The server's CI on the engine's first candidate (run 45667033943): report, the VS Code
end-to-end suite and the proot job on linux-arm64 and darwin-arm64 ended by SIGBUS at
startModuleMemoStore, the first thread the program creates; the unmodified image runs,
and so does every x86_64 one.

Co-authored-by: speak-agent <[email protected]>
@Sunrisepeak
Sunrisepeak merged commit 5323ece into main Nov 26, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant