Repository navigation
mcppls-clangd 0.0.24: a module that includes <Windows.h> for a 32-bit Windows target builds (mcpp-language-server #100) - #25
Merged
Conversation
… 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]>
…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]>
…s invalid again Co-authored-by: speak-agent <[email protected]>
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.
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, sowinnt.h'sInt64ShllMod32family (under_M_IX86) raised "MS-style inline assembly is not available: target MC unavailable". The editor path hides that diagnostic; a module build cannot:PCHGeneratorwrites 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+X86AsmParserwhen X86 is built;clangdMainregisters 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__asmblock; supervised worker and in-process builder both fail, the importer reportsmodule 'a' not found); with the patch both build and report 0 errors.ClangdTestspasses whole (1520 cases) with the newMSAsmModulesTests. Cold/warm--checkof a 30-module importer unchanged within spread. Cost: +4.4 MB in the nativeclangd.Not carried: #19 (ok image worker diagnostics on disk): needs openkal's process-start API; noted at
WorkerDiagnosticsand in the ledger.Design:
.agents/docs/2026-11-26-issue-100-engine-batch-design.mdin mcpp-language-server. The product PR tests this build throughengine-candidate.jsonbefore merge.