Skip to content

P5: MSVC ABI + resolve the PDB decision (D5) #9

Open

Description

@zackees

Part of #2. Full spec: 07-PHASE-5-WINMSVC.md

Most COFF machinery already exists from P3. This phase is the link.exe argument dialect, MSVC CRT conventions, and the debug-information decision.

P5-T0 blocks everything else in this phase. A dev-loop linker whose output cannot be debugged is not a dev-loop linker, and MSVC-ABI debugging means PDB. Evidence: radlink's PDB subsystem is ~20k lines; the Rust pdb crates are read-oriented; nobody has ever shipped incremental PDB generation except MSVC's /DEBUG:FASTLINK, which was removed in VS 2026 for producing a worse debugging experience.

Option Cost Consequence
(a) Write PDB ~15–20k LOC Full VS/WinDbg debugging; dominates the phase
(b) DWARF-in-PE small, P3 already does it LLDB works; VS and WinDbg do not
(c) No debug info zero Contradicts reld's premise; reject

Recommendation: (b) for v0, (a) only on demonstrated demand. Whatever is chosen goes in the README, not buried in an issue.

  • P5-T1 link.exe dialect (~40 switches, @response files, .drectve — that's how the CRT gets pulled in)
  • P5-T2 MSVC CRT conventions, .CRT$XC* ordering
  • P5-T3 /OPT:ICF accepted-and-warned (MSBuild passes it unconditionally); /INCREMENTAL accepted-and-ignored — Microsoft's scheme is not ours

Done when: ci/gate-winmsvc.sh exits 0.

Activity

  1. added
    enhancement
    on Aug 1, 2026
  2. zackees commented on Sep 18, 2026

    @zackees
    CollaboratorAuthor

    D5 decided (owner, via #154): PDBs come from LLD's own PDB writer through llvm-ld. llvm-ld already produces EXE and PDB output byte-identical to stock LLD, gated in its CI (llvm-ld#5), and has parallelized PDB emission (llvm-ld#14).

    That settles the question that blocked this issue: reld doesn't write its own PDB emitter. What's left here is the MSVC ABI work on top of #96's routing, so this issue follows #96 and inherits its gate (after #153).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions